debian-forge-composer/internal/common
Lars Karlitski 17ca73ab14 osbuild-pipeline: validate distro when fetching it
We were verifying two things: if the passed distroArg exists in the
distribution mapping in common/types.go and if the it is an actually
registered distro. Since you cannot have distros registered that don't
correspond to a type, the first test is unnecessary.

Merge the two tests by moving the (much better) error message down into
the second test. This makes DistributionExists redundant, because
Registry.GetDistro() checks this implicitly.

Also, move ListDistributions() to the Registry object, because we want
to show distributions that are actually registered.

Add a test which checks that Registry.List() works and that all included
distributions register correctly.
2020-03-03 16:21:13 +01:00
..
compose_result.go lint: fix unhandled errors 2020-03-02 14:28:55 +01:00
helpers.go lint: fix unhandled errors 2020-03-02 14:28:55 +01:00
states.go common: refactor build states into a separate file 2020-02-12 11:17:26 +01:00
states_test.go tree-wide: format code with gofmt 2020-02-17 16:09:17 +01:00
types.go osbuild-pipeline: validate distro when fetching it 2020-03-03 16:21:13 +01:00
types_test.go common: fix method signature for UnmarshalJSON 2020-02-20 13:04:28 +01:00