Skip to content

pkgs-lib.formats: test format types #392465

Open
@h7x4

Description

@h7x4

Summary

We should tests the types of all formats, to ensure that the module system doesn't let more or less through than what the format generators expect.

Motivation

I stumbled upon an issue earlier with pkgs.formats.hocon, where it didn't allow me to set _includes as specified in the docs, because the nixos module wouldn't accept it's type. The _includes functionality is well tested through the format generator, but there is no test to ensure that the type agrees. And AFAIK, none of the format types have been tested in isolation (although many are being indirectly tested in nixosTests through modules that use the format type).

I think it would be a good addition to create such tests for all formats, maybe by leveraging lib.evalModules.

Maintainer pings: @h7x4 @Stunkymonkey

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancementAdd something new6.topic: testingTooling for automated testing of packages and modules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions