Apply CLI overrides after typed decoding
This commit is contained in:
@@ -351,6 +351,10 @@ func TestExplanationReconcilesDefaultsAfterInputReplacement(t *testing.T) {
|
||||
opts.Overlay = "p"
|
||||
}
|
||||
result, err := testLoad(File(main), opts)
|
||||
if cli && base == "replaced-text" {
|
||||
requireSecretLoadCode(t, err, CodeDecodeType)
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -360,6 +364,18 @@ func TestExplanationReconcilesDefaultsAfterInputReplacement(t *testing.T) {
|
||||
t.Fatal("missing explanation")
|
||||
}
|
||||
last := explanation.History[len(explanation.History)-1]
|
||||
if cli && path.String() == "/m" {
|
||||
if last.After != explanation.Effective || last.Origin.Layer != LayerCLI || last.Origin.Operation != "" {
|
||||
t.Fatalf("CLI assignment was not the final history event: %#v", explanation)
|
||||
}
|
||||
continue
|
||||
}
|
||||
if cli && path.String() == "/m/a" {
|
||||
if explanation.Effective.Present {
|
||||
t.Fatalf("CLI map override retained descendants discarded by source null: %#v", explanation)
|
||||
}
|
||||
continue
|
||||
}
|
||||
if last.After != explanation.Effective || last.Origin.Operation != ChangeDecoding {
|
||||
t.Fatalf("history does not reconcile final value: %#v", explanation)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user