Skip to content

Commit

Permalink
fiing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwahiremat committed Sep 19, 2023
1 parent 0966dc9 commit b63816e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/ucp/store/map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ func TestDecodeMap_WithResourceIDs(t *testing.T) {
require.Equal(t, data["ID"], out.ID.String())
})

t.Run("invalid", func(t *testing.T) {
t.Run("terraform id", func(t *testing.T) {
data := map[string]any{
"ID": "asdf",
"ID": "terraform-id",
}

out := datatype{}
err := DecodeMap(data, &out)
require.Error(t, err)
require.NoError(t, err)
require.Equal(t, data["ID"], out.ID.String())
})
}

0 comments on commit b63816e

Please sign in to comment.