-
Notifications
You must be signed in to change notification settings - Fork 385
Allow unstructed schema for config in ProxyDefaults #921
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like such a harmless change 😂 Nicely done!!
@@ -92,6 +92,10 @@ func TestController(t *testing.T) { | |||
proxyDefaultEntry, ok := entry.(*api.ProxyConfigEntry) | |||
require.True(r, ok, "could not cast to ProxyConfigEntry") | |||
require.Equal(r, api.MeshGatewayModeLocal, proxyDefaultEntry.MeshGateway.Mode) | |||
require.Equal(r, "tcp", proxyDefaultEntry.Config["protocol"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's also test foo
and member
for completeness. Or we can remove those from the fixture. I like testing multiple types, so maybe bool, array, map, string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, good call. I think I've made an assumption that these are going to be ignored by consul, but they're not!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice investigation and catch! Looks great!!
Please see hashicorp/consul-k8s#495 for details about why this change is needed
Changes proposed in this PR:
config
field, we're not setting all acceptable values but I think it's OK since we're trying to check that at least one is accepted by Consul.How I've tested this PR:
How I expect reviewers to test this PR:
Checklist: