Adopt Notarius configuration overlays
This commit is contained in:
@@ -103,7 +103,7 @@ storage:
|
||||
notarius:
|
||||
enabled: false
|
||||
credentials: [NARRATIO_TEST_NOTARIUS_KEY]
|
||||
config_profile: ""
|
||||
config_overlay: ""
|
||||
`
|
||||
pipelinePath, _ := writeConfigFiles(t, pipelineYAML, testSessionBaseYAML)
|
||||
|
||||
@@ -141,20 +141,20 @@ notarius:
|
||||
}
|
||||
}
|
||||
}
|
||||
if !strings.Contains(string(firstYAML), "config_profile: \"\"\n") {
|
||||
t.Fatalf("effective YAML omitted explicit empty Notarius config profile: %q", firstYAML)
|
||||
if !strings.Contains(string(firstYAML), "config_overlay: \"\"\n") {
|
||||
t.Fatalf("effective YAML omitted explicit empty Notarius config overlay: %q", firstYAML)
|
||||
}
|
||||
var roundTrip struct {
|
||||
Notarius *struct {
|
||||
Credentials []string `yaml:"credentials"`
|
||||
ConfigProfile *string `yaml:"config_profile"`
|
||||
ConfigOverlay *string `yaml:"config_overlay"`
|
||||
} `yaml:"notarius"`
|
||||
}
|
||||
if err := yaml.Unmarshal(firstYAML, &roundTrip); err != nil {
|
||||
t.Fatalf("round-trip effective YAML: %v", err)
|
||||
}
|
||||
if roundTrip.Notarius == nil || roundTrip.Notarius.ConfigProfile == nil || *roundTrip.Notarius.ConfigProfile != "" {
|
||||
t.Fatalf("round-trip config profile = %#v, want explicit empty", roundTrip.Notarius)
|
||||
if roundTrip.Notarius == nil || roundTrip.Notarius.ConfigOverlay == nil || *roundTrip.Notarius.ConfigOverlay != "" {
|
||||
t.Fatalf("round-trip config overlay = %#v, want explicit empty", roundTrip.Notarius)
|
||||
}
|
||||
if len(roundTrip.Notarius.Credentials) != 1 || roundTrip.Notarius.Credentials[0] != "NARRATIO_TEST_NOTARIUS_KEY" {
|
||||
t.Fatalf("round-trip credential reference = %#v, want safe public name", roundTrip.Notarius.Credentials)
|
||||
|
||||
Reference in New Issue
Block a user