object: hostNetwork setting should be under spec.gateway instead of spec in the ObjectStore CRD

Signed-off-by: zhucan <zhucan.k8s@gmail.com>
(cherry picked from commit 2011d9104d)
This commit is contained in:
zhucan authored and Travis Nielsen committed 2022-08-22 13:40:52 -06:00
1 parent fe420e679d
commit e8a93eab2a
3 files changed
+11 -11

No files matched your search

+3 -3
View File
@@ -633,15 +633,15 @@ func TestMakeRGWPodSpec(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
if tt.isSet {
if tt.enabled {
c.store.Spec.HostNetwork = func(hostNetwork bool) *bool { return &hostNetwork }(true)
c.store.Spec.Gateway.HostNetwork = func(hostNetwork bool) *bool { return &hostNetwork }(true)
} else {
c.store.Spec.HostNetwork = new(bool)
c.store.Spec.Gateway.HostNetwork = new(bool)
}
}
podTemplateSpec, _ := c.makeRGWPodSpec(rgwConfig)
if tt.isSet {
assert.Equal(t, *c.store.Spec.HostNetwork, podTemplateSpec.Spec.HostNetwork)
assert.Equal(t, *c.store.Spec.Gateway.HostNetwork, podTemplateSpec.Spec.HostNetwork)
} else {
assert.Equal(t, c.clusterSpec.Network.IsHost(), podTemplateSpec.Spec.HostNetwork)
}