Skip to content

Commit

Permalink
expected and actual swap
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitpatel96 committed Mar 27, 2024
1 parent f7f19bb commit bbf17cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions confmap/provider/envprovider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestEnvWithLogger(t *testing.T) {
assert.Equal(t, expectedMap.ToStringMap(), retMap.ToStringMap())

assert.NoError(t, env.Shutdown(context.Background()))
assert.Equal(t, ol.Len(), 0)
assert.Equal(t, 0, ol.Len())
}

func TestUnsetEnvWithLoggerWarn(t *testing.T) {
Expand All @@ -107,8 +107,8 @@ func TestUnsetEnvWithLoggerWarn(t *testing.T) {
assert.Equal(t, expectedMap.ToStringMap(), retMap.ToStringMap())

assert.NoError(t, env.Shutdown(context.Background()))
assert.Equal(t, ol.Len(), 1)
assert.Equal(t, ol.All()[0].Message, "Environment variable default-config is used in configuration but is unset")
assert.Equal(t, 1, ol.Len())
assert.Equal(t, "Environment variable default-config is used in configuration but is unset", ol.All()[0].Message)
}

func TestEmptyEnvWithLoggerWarn(t *testing.T) {
Expand All @@ -127,6 +127,6 @@ func TestEmptyEnvWithLoggerWarn(t *testing.T) {
assert.Equal(t, expectedMap.ToStringMap(), retMap.ToStringMap())

assert.NoError(t, env.Shutdown(context.Background()))
assert.Equal(t, ol.Len(), 1)
assert.Equal(t, ol.All()[0].Message, "Environment variable default-config is used in configuration but is empty")
assert.Equal(t, 1, ol.Len())
assert.Equal(t, "Environment variable default-config is used in configuration but is empty", ol.All()[0].Message)
}

0 comments on commit bbf17cb

Please sign in to comment.