Context
All FCOS test coverage gaps. Do last — after all implementation issues land.
Ignition tests
internal/ignition/ignition_test.go currently asserts variant: flatcar and /etc/flatcar/ paths throughout. Add parallel FCOS test functions for every existing test fixture:
func TestGenerateButane_FCOS_Header(t *testing.T) {
// asserts variant: fcos\nversion: 1.5.0
}
func TestGenerateButane_FCOS_NoFlatcarPaths(t *testing.T) {
// asserts /etc/flatcar/update.conf NOT present
// asserts /etc/flatcar/enabled-sysext.conf NOT present
// asserts update-engine.service NOT present
}
func TestGenerateButane_FCOS_ZincatiConfig(t *testing.T) {
// asserts /etc/zincati/config.d/55-updates.toml present
// asserts zincati.service enabled
// asserts [updates] strategy = "immediate" for immediate strategy
}
Install tests
internal/install/install_test.go tests assert flatcar-install was called. Add FCOS variants:
func TestFCOSInstaller_CallsCoreoInstaller(t *testing.T) {
// SpyRunner: assert "coreos-installer" called (not "flatcar-install")
// assert args contain "install", "--stream", "stable", "--ignition-file"
// assert wipefs NOT called
// assert sfdisk NOT called
}
Dispatcher tests
internal/install/install_test.go — test DispatchingInstaller:
func TestDispatchingInstaller_RoutesToFlatcar(t *testing.T) { ... }
func TestDispatchingInstaller_RoutesToFCOS(t *testing.T) { ... }
func TestDispatchingInstaller_NilFCOSPanics(t *testing.T) { ... }
Validate tests
internal/validate/validate_test.go — add TestFCOSStream table-driven tests:
var fcosStreamTests = []struct{ input string; wantErr bool }{
{"stable", false},
{"testing", false},
{"next", false},
{"lts", true}, // Flatcar-only
{"edge", true}, // Flatcar-only
{"", true},
{"beta", true},
}
Headless tests
internal/headless/headless_test.go — add FCOS config test cases:
{"os": "fcos", "channel": "stable", ...} — valid, routes to FCOS ignition
{"os": "fcos", "channel": "lts", ...} — invalid stream
{"os": "fcos", "nvidia_driver_version": "570-open", ...} — rejected
{"os": "flatcar", ...} — existing tests unchanged (regression gate)
FCOS stream metadata tests
internal/fcos/streams_test.go:
- Mock HTTP server returning FCOS stream JSON
- Assert
FetchStreamFedoraVersion("stable") returns the correct major version
- Assert error on HTTP failure
- Assert error on malformed version string
Bakery FCOS tests
internal/bakery/bakery_fcos_test.go:
TestParseFCOSTagName — table-driven, covers real tag name examples from the fedora-sysexts/community catalog
TestFetchCatalogFCOS_FiltersCorrectFedoraVersion — mock server, assert only Fedora 44 assets returned when fedoraVersion=44
vm-e2e FCOS (Justfile — separate recipe, NOT a variant of existing)
The existing vm-e2e recipe uses:
flatcar_base_amd64.img as the installer disk
-fw_cfg name=opt/org.flatcar-linux/config,file=... for Ignition delivery
- Flatcar-specific assertions (
flatcar-update-engine.service, etc.)
For FCOS vm-e2e, these ALL change:
- Base image: FCOS QEMU image (
qcow2 format from Fedora CDN)
- Ignition delivery:
-fw_cfg name=opt/com.coreos/config,file=... (different path!)
- Assertions:
zincati.service, no update-engine.service
Add just vm-e2e-fcos as a new recipe — do not modify the existing vm-e2e. They run independently.
Acceptance criteria
Dependencies
Part of epic #500
Context
All FCOS test coverage gaps. Do last — after all implementation issues land.
Ignition tests
internal/ignition/ignition_test.gocurrently assertsvariant: flatcarand/etc/flatcar/paths throughout. Add parallel FCOS test functions for every existing test fixture:Install tests
internal/install/install_test.gotests assertflatcar-installwas called. Add FCOS variants:Dispatcher tests
internal/install/install_test.go— testDispatchingInstaller:Validate tests
internal/validate/validate_test.go— addTestFCOSStreamtable-driven tests:Headless tests
internal/headless/headless_test.go— add FCOS config test cases:{"os": "fcos", "channel": "stable", ...}— valid, routes to FCOS ignition{"os": "fcos", "channel": "lts", ...}— invalid stream{"os": "fcos", "nvidia_driver_version": "570-open", ...}— rejected{"os": "flatcar", ...}— existing tests unchanged (regression gate)FCOS stream metadata tests
internal/fcos/streams_test.go:FetchStreamFedoraVersion("stable")returns the correct major versionBakery FCOS tests
internal/bakery/bakery_fcos_test.go:TestParseFCOSTagName— table-driven, covers real tag name examples from the fedora-sysexts/community catalogTestFetchCatalogFCOS_FiltersCorrectFedoraVersion— mock server, assert only Fedora 44 assets returned whenfedoraVersion=44vm-e2e FCOS (Justfile — separate recipe, NOT a variant of existing)
The existing
vm-e2erecipe uses:flatcar_base_amd64.imgas the installer disk-fw_cfg name=opt/org.flatcar-linux/config,file=...for Ignition deliveryflatcar-update-engine.service, etc.)For FCOS vm-e2e, these ALL change:
qcow2format from Fedora CDN)-fw_cfg name=opt/com.coreos/config,file=...(different path!)zincati.service, noupdate-engine.serviceAdd
just vm-e2e-fcosas a new recipe — do not modify the existingvm-e2e. They run independently.Acceptance criteria
TestGenerateButane_FCOS_*tests passTestFCOSInstaller_*tests pass withSpyRunnerTestDispatchingInstaller_*tests passTestFCOSStreamtable-driven tests passTestParseFCOSTagNamecovers ≥5 real tag examplesjust cigreenDependencies
Part of epic #500