mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-27 10:19:35 +00:00
matchbox: Update tests due to Ignition 2.1.0 format
This commit is contained in:
@@ -5,6 +5,9 @@ Notable changes between releases.
|
||||
## Latest
|
||||
|
||||
* Add gRPC API endpoints for managing generic (experimental) templates
|
||||
* Update Container Linux config transpiler to v0.5.0
|
||||
* Update Ignition to v0.19.0, render v2.1.0 Ignition configs
|
||||
* Drop support for Container Linux versions below 1465.0.0 (breaking)
|
||||
* Remove Profile `Cmdline` map (deprecated in v0.5.0), use `Args` slice instead
|
||||
* Remove pixiecore support (deprecated in v0.5.0)
|
||||
* Remove `ContextHandler`, `ContextHandlerFunc`, and `NewHandler` from the `matchbox/http` package.
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIgnitionHandler_V2JSON(t *testing.T) {
|
||||
content := `{"ignition":{"version":"2.0.0","config":{}},"storage":{},"systemd":{"units":[{"name":"etcd2.service","enable":true}]},"networkd":{},"passwd":{}}`
|
||||
content := `{"ignition":{"version":"2.1.0","config":{}},"storage":{},"systemd":{"units":[{"name":"etcd2.service","enable":true}]},"networkd":{},"passwd":{}}`
|
||||
profile := &storagepb.Profile{
|
||||
Id: fake.Group.Profile,
|
||||
IgnitionId: "file.ign",
|
||||
@@ -52,7 +52,7 @@ systemd:
|
||||
enable: true
|
||||
contents: {{.request.raw_query}}
|
||||
`
|
||||
expectedIgnitionV2 := `{"ignition":{"version":"2.0.0","config":{}},"storage":{},"systemd":{"units":[{"name":"etcd2.service","enable":true},{"name":"a1b2c3d4.service","enable":true},{"name":"some-param.service","enable":true,"contents":"foo=some-param\u0026bar=b"}]},"networkd":{},"passwd":{}}`
|
||||
expectedIgnitionV2 := `{"ignition":{"config":{},"timeouts":{},"version":"2.1.0"},"networkd":{},"passwd":{},"storage":{},"systemd":{"units":[{"enable":true,"name":"etcd2.service"},{"enable":true,"name":"a1b2c3d4.service"},{"contents":"foo=some-param\u0026bar=b","enable":true,"name":"some-param.service"}]}}`
|
||||
store := &fake.FixedStore{
|
||||
Profiles: map[string]*storagepb.Profile{fake.Group.Profile: testProfileIgnitionYAML},
|
||||
IgnitionConfigs: map[string]string{testProfileIgnitionYAML.IgnitionId: content},
|
||||
|
||||
Reference in New Issue
Block a user