Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Nemeti authored and multi-io committed Dec 3, 2024
1 parent 0863c5e commit 841796b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions metakube/resource_node_deployment_structure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand All @@ -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",
},
Expand All @@ -352,7 +352,7 @@ func TestFlattenOpenstackNodeSpec(t *testing.T) {
&models.OpenstackNodeSpec{},
[]interface{}{
map[string]interface{}{
"use_floating_ip": false,
"use_floating_ip": (*bool)(nil),
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions metakube/resource_node_deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 841796b

Please sign in to comment.