Replace generic resolution recording with intent methods
This commit is contained in:
@@ -29,7 +29,7 @@ func TestDiffUsesFinalValuesAndDependencyDerivedSensitivity(t *testing.T) {
|
||||
Resolve: func(configuration *diffIntegrationConfig, resolution *Resolution) error {
|
||||
resolveCalls++
|
||||
configuration.Derived = configuration.Dynamic["visible"].(string)
|
||||
resolution.Record(Keys("derived"), ChangeNormalization, "derive from effective values", Keys("credential"))
|
||||
resolution.RecordNormalization(Keys("derived"), "derive from effective values", Keys("credential"))
|
||||
return nil
|
||||
},
|
||||
}}
|
||||
@@ -203,7 +203,7 @@ func TestDiffProtectsHistoricalSensitiveRemovalAndReplacement(t *testing.T) {
|
||||
t.Run("removed historical value", func(t *testing.T) {
|
||||
left := load("dynamic: {token: removed-canary}\n", func(configuration *configuration, resolution *Resolution) error {
|
||||
delete(configuration.Dynamic, "token")
|
||||
resolution.Record(secretPath, ChangeNormalization, "remove token")
|
||||
resolution.RecordNormalization(secretPath, "remove token")
|
||||
return nil
|
||||
})
|
||||
right := load("dynamic: {token: current-canary}\n", nil)
|
||||
@@ -228,7 +228,7 @@ func TestDiffProtectsHistoricalSensitiveRemovalAndReplacement(t *testing.T) {
|
||||
t.Run("replaced historical value", func(t *testing.T) {
|
||||
left := load("dynamic: {token: original-canary}\n", func(configuration *configuration, resolution *Resolution) error {
|
||||
configuration.Dynamic["token"] = "replacement-canary"
|
||||
resolution.Record(secretPath, ChangeNormalization, "replace token")
|
||||
resolution.RecordNormalization(secretPath, "replace token")
|
||||
return nil
|
||||
})
|
||||
right := load("dynamic: {token: other-canary}\n", nil)
|
||||
|
||||
Reference in New Issue
Block a user