Skip to content

Commit

Permalink
Fix map test with int key
Browse files Browse the repository at this point in the history
Not sure why this passed the previous PR, but on my mac it now works
properly. Hopefully this isn't a linux/mac thing?
  • Loading branch information
Aiden Scandella committed Nov 8, 2016
1 parent b08b5f9 commit acbe8bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ foo:
assert.Equal(t, 1, instance.ServiceConfig.Bar)
}

func TestLoadInstanceConfig_InvalidConfig(t *testing.T) {
func TestLoadInstanceConfig_IntKey(t *testing.T) {
cfg := config.NewYAMLProviderFromBytes([]byte(`
foo:
bar:
Expand All @@ -152,7 +152,8 @@ foo:
Bar map[int]interface{} `yaml:"bar"`
}
}{}
assert.False(t, loadInstanceConfig(cfg, "foo", &instance))
assert.True(t, loadInstanceConfig(cfg, "foo", &instance))
assert.Equal(t, instance.ServiceConfig.Bar[1], "baz")
}

func TestHostStop_NoError(t *testing.T) {
Expand Down

0 comments on commit acbe8bd

Please sign in to comment.