diff --git a/metakube/resource_node_deployment_structure_test.go b/metakube/resource_node_deployment_structure_test.go index 02814a9..3bb8ec5 100644 --- a/metakube/resource_node_deployment_structure_test.go +++ b/metakube/resource_node_deployment_structure_test.go @@ -327,8 +327,8 @@ func TestFlattenOpenstackNodeSpec(t *testing.T) { Flavor: strToPtr("big"), Image: strToPtr("Ubuntu"), UseFloatingIP: ptr.To(true), - InstanceReadyCheckPeriod: ptr.To("10s"), - InstanceReadyCheckTimeout: ptr.To("120s"), + InstanceReadyCheckPeriod: "10s", + InstanceReadyCheckTimeout: "120s", Tags: map[string]string{ "foo": "bar", }, @@ -340,7 +340,7 @@ func TestFlattenOpenstackNodeSpec(t *testing.T) { "image": "Ubuntu", "instance_ready_check_period": "10s", "instance_ready_check_timeout": "120s", - "use_floating_ip": true, + "use_floating_ip": ptr.To(true), "tags": map[string]string{ "foo": "bar", }, @@ -352,7 +352,7 @@ func TestFlattenOpenstackNodeSpec(t *testing.T) { &models.OpenstackNodeSpec{}, []interface{}{ map[string]interface{}{ - "use_floating_ip": false, + "use_floating_ip": (*bool)(nil), }, }, }, diff --git a/metakube/resource_node_deployment_test.go b/metakube/resource_node_deployment_test.go index a267cc2..3bd9b38 100644 --- a/metakube/resource_node_deployment_test.go +++ b/metakube/resource_node_deployment_test.go @@ -301,8 +301,8 @@ func testAccCheckMetaKubeNodeDeploymentFields(rec *models.NodeDeployment, flavor return fmt.Errorf("Image=%s doesn't match %s", *openstack.Image, image) } - if openstack.RootDiskSizeGB != int64(diskSize) { - return fmt.Errorf("RootDiskSizeGB=%d, want %d", openstack.RootDiskSizeGB, diskSize) + if openstack.RootDiskSizeGB != nil && *openstack.RootDiskSizeGB != int64(diskSize) { + return fmt.Errorf("RootDiskSizeGB=%v, want %d", openstack.RootDiskSizeGB, diskSize) } opSys := rec.Spec.Template.OperatingSystem