diff --git a/internal/pkg/api/handleCheckin.go b/internal/pkg/api/handleCheckin.go index a780d47d7..45413b820 100644 --- a/internal/pkg/api/handleCheckin.go +++ b/internal/pkg/api/handleCheckin.go @@ -35,8 +35,8 @@ import ( "github.com/miolini/datacounter" "github.com/rs/zerolog" - "go.elastic.co/apm/module/apmhttp/v2" - "go.elastic.co/apm/v2" + apmhttp "go.elastic.co/apm/module/apmhttp/v2" + apm "go.elastic.co/apm/v2" ) var ( diff --git a/internal/pkg/policy/secret_test.go b/internal/pkg/policy/secret_test.go index b66385b11..8017bad4d 100644 --- a/internal/pkg/policy/secret_test.go +++ b/internal/pkg/policy/secret_test.go @@ -129,7 +129,7 @@ func TestGetPolicyInputsWithSecretsAndStreams(t *testing.T) { result, keys, _ := getPolicyInputsWithSecrets(context.TODO(), &pData, bulker) assert.Equal(t, expectedResult, result) - assert.Equal(t, []string{"inputs[0].package_var_secret", "inputs[0].input_var_secret", "inputs[1].streams[0].package_var_secret", "inputs[1].streams[0].input_var_secret", "inputs[1].streams[0].stream_var_secret"}, keys) + assert.ElementsMatch(t, []string{"inputs[0].package_var_secret", "inputs[0].input_var_secret", "inputs[1].streams[0].package_var_secret", "inputs[1].streams[0].input_var_secret", "inputs[1].streams[0].stream_var_secret"}, keys) assert.Nil(t, pData.SecretReferences) } @@ -177,7 +177,7 @@ func TestPolicyInputSteamsEmbedded(t *testing.T) { require.NoError(t, err) assert.Equal(t, expected, result) - assert.Equal(t, []string{"inputs[0].streams[0].embedded.embedded-arr[0].embedded-secret"}, keys) + assert.ElementsMatch(t, []string{"inputs[0].streams[0].embedded.embedded-arr[0].embedded-secret"}, keys) } func TestGetPolicyInputsNoopWhenNoSecrets(t *testing.T) { @@ -271,7 +271,7 @@ func TestProcessOutputSecret(t *testing.T) { assert.NoError(t, err) assert.Equal(t, expectOutput, output) - assert.Equal(t, tc.expectKeys, keys) + assert.ElementsMatch(t, tc.expectKeys, keys) }) } }