Use main for the main provenance layer
This commit is contained in:
@@ -137,7 +137,7 @@ dynamic: selected
|
||||
if got := explanationValues(concurrency); !reflect.DeepEqual(got, []string{"4\n", "8\n", "1\n", "2\n", "3\n"}) {
|
||||
t.Fatalf("concurrency history = %#v", got)
|
||||
}
|
||||
if got := historyValueLayers(concurrency); !reflect.DeepEqual(got, []Layer{LayerDefault, LayerBase, LayerOverlay, LayerCLI, LayerResolution}) {
|
||||
if got := historyValueLayers(concurrency); !reflect.DeepEqual(got, []Layer{LayerDefault, LayerMain, LayerOverlay, LayerCLI, LayerResolution}) {
|
||||
t.Fatalf("concurrency layers = %#v", got)
|
||||
}
|
||||
if concurrency.History[4].Before.YAML != "2\n" || concurrency.History[4].Reasons[0] != "normalized\nconcurrency" ||
|
||||
@@ -265,7 +265,7 @@ dynamic: selected
|
||||
var invalidInput bytes.Buffer
|
||||
if err := result.WriteExplanation(&invalidInput, Keys("limit")); err != nil ||
|
||||
!strings.Contains(invalidInput.String(), "policy-validated input") ||
|
||||
strings.Contains(invalidInput.String(), "wrong-before-overlay\n source: layer=\"base\"\n before (canonical typed)") {
|
||||
strings.Contains(invalidInput.String(), "wrong-before-overlay\n source: layer=\"main\"\n before (canonical typed)") {
|
||||
t.Fatalf("historical representation rendering = %v\n%s", err, invalidInput.String())
|
||||
}
|
||||
}
|
||||
@@ -312,7 +312,7 @@ func TestHistoryNodeBudgetCountsSharedTreesOnce(t *testing.T) {
|
||||
builder.model.baseline = root
|
||||
builder.model.final = root
|
||||
builder.model.sourcePayloads = []historySourcePayload{{
|
||||
kind: historySourceApplicationPayload, application: historyApplication{layer: LayerBase, value: root},
|
||||
kind: historySourceApplicationPayload, application: historyApplication{layer: LayerMain, value: root},
|
||||
}}
|
||||
model := builder.freeze()
|
||||
inspection := &Inspection{history: model, metadata: Metadata{historyModel: model}, final: root}
|
||||
@@ -325,7 +325,7 @@ func TestHistoryNodeBudgetCountsSharedTreesOnce(t *testing.T) {
|
||||
builder.model.baseline = root
|
||||
builder.model.final = root
|
||||
builder.model.sourcePayloads = []historySourcePayload{{
|
||||
kind: historySourceApplicationPayload, application: historyApplication{layer: LayerBase, value: other},
|
||||
kind: historySourceApplicationPayload, application: historyApplication{layer: LayerMain, value: other},
|
||||
}}
|
||||
model = builder.freeze()
|
||||
inspection.history = model
|
||||
@@ -445,7 +445,7 @@ func TestIntegerVersionInspectionRetainsInputAndReconcilesTypedValue(t *testing.
|
||||
}
|
||||
|
||||
info, ok := first.Metadata().Lookup(Keys("version"))
|
||||
if !ok || !info.Explicit || info.Null || info.Origin.Layer != LayerBase || len(info.Origin.Locations) != 1 ||
|
||||
if !ok || !info.Explicit || info.Null || info.Origin.Layer != LayerMain || len(info.Origin.Locations) != 1 ||
|
||||
info.Origin.Locations[0].SourceID != "source-1" || info.Origin.Locations[0].Line != 1 {
|
||||
t.Fatalf("version metadata = %#v, %v", info, ok)
|
||||
}
|
||||
@@ -455,7 +455,7 @@ func TestIntegerVersionInspectionRetainsInputAndReconcilesTypedValue(t *testing.
|
||||
}
|
||||
foundInput, foundDecoding := false, false
|
||||
for _, change := range explanation.History {
|
||||
if change.After.YAML == "4\n" && change.Origin.Layer == LayerBase {
|
||||
if change.After.YAML == "4\n" && change.Origin.Layer == LayerMain {
|
||||
foundInput = true
|
||||
}
|
||||
if change.Before.YAML == "4\n" && change.After.YAML == "'4'\n" && change.Origin.Operation == ChangeDecoding {
|
||||
|
||||
Reference in New Issue
Block a user