diff --git a/src/test/util_test.go b/src/test/util_test.go index a33217719dc8ea2ec648f53932955c96ba193b21..ac22fff05f5e8496e7c3febff004d5d150ec61d1 100644 --- a/src/test/util_test.go +++ b/src/test/util_test.go @@ -34,22 +34,21 @@ func TestClearByteArray(t *testing.T) { } func TestReadTokenFromEnvironment1(t *testing.T) { - os.Setenv("ak", "ZXhhbXBsZUFL") - os.Setenv("sk", "ZXhhbXBsZVNL") + os.Setenv("AK", "ZXhhbXBsZUFL") + os.Setenv("SK", "ZXhhbXBsZVNL") err := util.ReadTokenFromEnvironment() - assert.EqualValues(t, 0, len(os.Getenv("ak"))) - assert.EqualValues(t, 0, len(os.Getenv("sk"))) + assert.EqualValues(t, 0, len(os.Getenv("AK"))) + assert.EqualValues(t, 0, len(os.Getenv("SK"))) assert.NoError(t, err, "No error is expected") } func TestReadTokenFromEnvironment2(t *testing.T) { - os.Setenv("ak", "ZXhhbXBsZUFL") + os.Setenv("AK", "ZXhhbXBsZUFL") err := util.ReadTokenFromEnvironment() Expected := "ak and sk keys should be set in env variable" assert.EqualError(t, err, Expected) } - func TestGetAppInstanceIdDecodeFailed(t *testing.T) { os.Setenv("APPINSTID", "b1fe5b4d-76a7-4a52-b60f-932fde7c8d57") _, err := util.GetAppInstanceID() diff --git a/src/util/util.go b/src/util/util.go index 0d6b9a8eae78d5fa066b14d962c67cf8faa1501b..637ddc4f0323f26d3629bbcc2beee3431867fef4 100644 --- a/src/util/util.go +++ b/src/util/util.go @@ -47,8 +47,8 @@ var RefreshTimer *time.Timer const RefreshTimeBuffer = 5 const ( - ak string = "ak" - sk string = "sk" + ak string = "AK" + sk string = "SK" appInstID string = "APPINSTID" )