Finish native completion and retire legacy command machinery
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -103,21 +104,12 @@ func TestScriptoriumInheritsResolvedTypedCredentialsSafely(t *testing.T) {
|
||||
t.Fatalf("%s serialization omitted the inherited Scriptorium credential", name)
|
||||
}
|
||||
}
|
||||
values, err := EffectivePipelineValues(cfg)
|
||||
if err != nil {
|
||||
var inspection bytes.Buffer
|
||||
if err := cfg.ConfigKitResult().WriteEffective(&inspection); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
inspection, err := yaml.Marshal(values)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
foundInheritedCredential := false
|
||||
for _, value := range values {
|
||||
if value.Path == "scriptorium.credentials" && strings.Contains(value.Value, envName) {
|
||||
foundInheritedCredential = true
|
||||
}
|
||||
}
|
||||
if !foundInheritedCredential || strings.Contains(string(inspection), secret) {
|
||||
t.Fatal("effective inspection did not safely expose inherited credential identity")
|
||||
if !strings.Contains(inspection.String(), envName) || strings.Contains(inspection.String(), secret) {
|
||||
t.Fatal("native inspection did not safely expose inherited credential identity")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user