Move sensitivity classification to shared history
This commit is contained in:
@@ -40,7 +40,9 @@ func TestSecretClassificationParsesTypedHistoryAfterNumericShapeChanges(t *testi
|
||||
earlier := parseCompositionDocument(t, "earlier", test.earlier)
|
||||
final := parseCompositionDocument(t, "final", test.final)
|
||||
pointer := test.historical.String()
|
||||
metadata := Metadata{history: map[string][]Change{pointer: {{Path: test.historical}}}}
|
||||
builder := newHistoryBuilder()
|
||||
builder.observeDocument(earlier, historyPhaseSources)
|
||||
metadata := Metadata{historyModel: builder.freeze()}
|
||||
seen := false
|
||||
classified := classifySecretPaths(nil, func(path Path) bool {
|
||||
if path.String() != pointer {
|
||||
@@ -63,9 +65,10 @@ func TestSecretClassificationParsesTypedHistoryAfterNumericShapeChanges(t *testi
|
||||
|
||||
func TestSecretPredicateReceivesDetachedHistoricalPath(t *testing.T) {
|
||||
path := Keys("records").Key("1")
|
||||
metadata := Metadata{history: map[string][]Change{
|
||||
path.String(): {{Path: path}},
|
||||
}}
|
||||
root := parseCompositionDocument(t, "history", "records: {'1': value}\n")
|
||||
builder := newHistoryBuilder()
|
||||
builder.observeDocument(root, historyPhaseSources)
|
||||
metadata := Metadata{historyModel: builder.freeze()}
|
||||
seen := false
|
||||
classified := classifySecretPaths(nil, func(candidate Path) bool {
|
||||
if candidate.String() != path.String() {
|
||||
|
||||
Reference in New Issue
Block a user