@@ -35,11 +35,12 @@ import (
35
35
)
36
36
37
37
var testYamlFilePath = "testdata/config.yaml"
38
+ var securitySaltFilePath = "testdata/security.salt"
39
+ var securitySiteKeyFilePath = "testdata/security.sitekey"
38
40
var testFilePath = "testdata/test.file"
39
41
var databaseUserKey = "database.user"
40
42
var databasePasswordKey = "database.password"
41
43
var nonExistentYamlFilePath = "testdata/non-existent.yaml"
42
- var newUserNameString = "new-username"
43
44
var newPasswordString = "new-password 42 c@t"
44
45
var rootConfigYamlPath = "/config.yaml"
45
46
@@ -227,7 +228,7 @@ func TestNewConfigProvider(t *testing.T) {
227
228
err := os .WriteFile (tempFile , yamlContent , 0644 )
228
229
require .NoError (t , err )
229
230
230
- c , err := NewConfigProvider (tempFile , nil , []string {testFilePath }, validator .NewValidator ())
231
+ c , err := NewConfigProvider (tempFile , nil , []string {securitySaltFilePath , securitySiteKeyFilePath }, validator .NewValidator ())
231
232
require .NoError (t , err )
232
233
233
234
require .Equal (t , initialPw , c .k .String (databasePasswordKey ))
@@ -237,7 +238,7 @@ func TestNewConfigProvider(t *testing.T) {
237
238
err = os .WriteFile (tempFile , newYamlContent , 0644 )
238
239
require .NoError (t , err )
239
240
240
- // sleep for a 100 milliseconds to allow the file watcher to pick up the
241
+ // sleep for 100 milliseconds to allow the file watcher to pick up the
241
242
// change and reload the config
242
243
time .Sleep (100 * time .Millisecond )
243
244
@@ -269,7 +270,7 @@ func TestNewConfigProviderErrorUpdateFailValidate(t *testing.T) {
269
270
err = os .WriteFile (tempFile , yamlContent , 0644 )
270
271
require .NoError (t , err )
271
272
272
- c , err := NewConfigProvider (tempFile , nil , []string {testFilePath }, validator .NewValidator ())
273
+ c , err := NewConfigProvider (tempFile , nil , []string {securitySaltFilePath , securitySiteKeyFilePath }, validator .NewValidator ())
273
274
require .NoError (t , err )
274
275
275
276
cfg := c .Get ()
@@ -311,7 +312,7 @@ func TestConfigProviderGet(t *testing.T) {
311
312
err = os .WriteFile (tempFile , yamlContent , 0644 )
312
313
require .NoError (t , err )
313
314
314
- c , err := NewConfigProvider (tempFile , nil , []string {testFilePath }, validator .NewValidator ())
315
+ c , err := NewConfigProvider (tempFile , nil , []string {securitySaltFilePath , securitySiteKeyFilePath }, validator .NewValidator ())
315
316
require .NoError (t , err )
316
317
317
318
cfg := c .Get ()
0 commit comments