@@ -38,7 +38,7 @@ func TestReplaceSecurityKeys(t *testing.T) {
38
38
})
39
39
40
40
ReplaceSecurityKeys (propsWithDefaultKeys , newKeysPath , newSignKeyName , newEncryptKeyName )
41
- require .Equal (t , goldProps , propsWithDefaultKeys )
41
+ require .True (t , goldProps . Equals ( propsWithDefaultKeys ) )
42
42
}
43
43
44
44
func TestReplaceSecurityKeysEmpty (t * testing.T ) {
@@ -50,21 +50,21 @@ func TestReplaceSecurityKeysEmpty(t *testing.T) {
50
50
51
51
// No error should be returned since the properties map is empty
52
52
ReplaceSecurityKeys (propsWithNoKeys , newKeysPath , newSignKeyName , newEncryptKeyName )
53
- require .Equal (t , goldProps , propsWithNoKeys )
53
+ require .True (t , goldProps . Equals ( propsWithNoKeys ) )
54
54
}
55
55
56
56
func TestReplaceSecurityKeysNothingToReplace (t * testing.T ) {
57
- propsWithNoKeys := properties .NewFromHashmap (map [string ]string {
57
+ propsWithDifferentKeys := properties .NewFromHashmap (map [string ]string {
58
58
"tools.openocd.path" : "{runtime.tools.openocd.path}" ,
59
59
"tools.openocd.cmd" : "bin/openocd" ,
60
60
"tools.openocd.cmd.windows" : "bin/openocd.exe" ,
61
61
})
62
- goldProps := propsWithNoKeys .Clone ()
62
+ goldProps := propsWithDifferentKeys .Clone ()
63
63
newKeysPath := "/new-keys-path"
64
64
newSignKeyName := "new-signing-key.pem"
65
65
newEncryptKeyName := "new-encrypt-key.pem"
66
66
67
67
// No error should be returned since there are no keys in the properties map
68
- ReplaceSecurityKeys (propsWithNoKeys , newKeysPath , newSignKeyName , newEncryptKeyName )
69
- require .Equal (t , goldProps , propsWithNoKeys )
68
+ ReplaceSecurityKeys (propsWithDifferentKeys , newKeysPath , newSignKeyName , newEncryptKeyName )
69
+ require .True (t , goldProps . Equals ( propsWithDifferentKeys ) )
70
70
}
0 commit comments