mirror of https://github.com/status-im/consul.git
Code review changes
This commit is contained in:
parent
f7cc7ff5cd
commit
9d0ec2eec2
|
@ -1,3 +1,3 @@
|
||||||
```release-note:feature
|
```release-note:feature
|
||||||
server: Ensure that service-defaults `Meta` to is included in `ServiceConfigResponse`.
|
server: Ensure that service-defaults `Meta` is returned with the response to the `ConfigEntry.ResolveServiceConfig` RPC.
|
||||||
```
|
```
|
||||||
|
|
|
@ -1029,12 +1029,11 @@ func TestConfigEntry_ResolveServiceConfig(t *testing.T) {
|
||||||
"foo": 1,
|
"foo": 1,
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
meta := map[string]string{"foo": "bar"}
|
|
||||||
require.NoError(t, state.EnsureConfigEntry(2, &structs.ServiceConfigEntry{
|
require.NoError(t, state.EnsureConfigEntry(2, &structs.ServiceConfigEntry{
|
||||||
Kind: structs.ServiceDefaults,
|
Kind: structs.ServiceDefaults,
|
||||||
Name: "foo",
|
Name: "foo",
|
||||||
Protocol: "http",
|
Protocol: "http",
|
||||||
Meta: meta,
|
Meta: map[string]string{"foo": "bar"},
|
||||||
}))
|
}))
|
||||||
require.NoError(t, state.EnsureConfigEntry(2, &structs.ServiceConfigEntry{
|
require.NoError(t, state.EnsureConfigEntry(2, &structs.ServiceConfigEntry{
|
||||||
Kind: structs.ServiceDefaults,
|
Kind: structs.ServiceDefaults,
|
||||||
|
@ -1060,7 +1059,7 @@ func TestConfigEntry_ResolveServiceConfig(t *testing.T) {
|
||||||
"protocol": "grpc",
|
"protocol": "grpc",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Meta: meta,
|
Meta: map[string]string{"foo": "bar"},
|
||||||
// Don't know what this is deterministically
|
// Don't know what this is deterministically
|
||||||
QueryMeta: out.QueryMeta,
|
QueryMeta: out.QueryMeta,
|
||||||
}
|
}
|
||||||
|
|
|
@ -985,7 +985,7 @@ type ServiceConfigResponse struct {
|
||||||
Expose ExposeConfig `json:",omitempty"`
|
Expose ExposeConfig `json:",omitempty"`
|
||||||
TransparentProxy TransparentProxyConfig `json:",omitempty"`
|
TransparentProxy TransparentProxyConfig `json:",omitempty"`
|
||||||
Mode ProxyMode `json:",omitempty"`
|
Mode ProxyMode `json:",omitempty"`
|
||||||
Meta map[string]string
|
Meta map[string]string `json:",omitempty"`
|
||||||
QueryMeta
|
QueryMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue