Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunKoyalwar committed Aug 24, 2024
1 parent 33df020 commit ebccf66
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions runtime_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ func TestRuntimeMap(t *testing.T) {
require.NoError(t, err, "could not create temp file")
_, err = tempFile.WriteString(sb.String())
require.NoError(t, err, "could not write to temp file")
err = data.Set(tempFile.Name())
data2 := &RuntimeMap{}
err = data2.Set(tempFile.Name())
require.NoError(t, err, "could not set key-value")
require.Equal(t, 2, len(data.AsMap()), "could not get correct number of key-values")
require.Equal(t, "value", data.AsMap()["variable"], "could not get correct value")
require.Equal(t, "value2", data.AsMap()["variable2"], "could not get correct value")
require.Equal(t, 2, len(data2.AsMap()), "could not get correct number of key-values")
require.Equal(t, "value", data2.AsMap()["variable"], "could not get correct value")
require.Equal(t, "value2", data2.AsMap()["variable2"], "could not get correct value")
})
}

0 comments on commit ebccf66

Please sign in to comment.