Skip to content

Commit dfb9c15

Browse files
committed
test: fix filesystem size assertion by using strconv.FormatInt
1 parent 5f93d30 commit dfb9c15

File tree

2 files changed

+97
-96
lines changed

2 files changed

+97
-96
lines changed

internal/services/file/filesystem_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package file_test
33
import (
44
"fmt"
55
"regexp"
6+
"strconv"
67
"testing"
78

89
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
@@ -36,7 +37,7 @@ func TestAccFileSystem_Basic(t *testing.T) {
3637
Check: resource.ComposeTestCheckFunc(
3738
testAccCheckFileSystemExists(tt, "scaleway_file_filesystem.fs"),
3839
resource.TestCheckResourceAttr("scaleway_file_filesystem.fs", "name", fileSystemName),
39-
resource.TestCheckResourceAttr("scaleway_file_filesystem.fs", "size", fmt.Sprintf("%d", size)),
40+
resource.TestCheckResourceAttr("scaleway_file_filesystem.fs", "size", strconv.FormatInt(int64(size), 10)),
4041
),
4142
},
4243
{
@@ -48,7 +49,7 @@ func TestAccFileSystem_Basic(t *testing.T) {
4849
`, fileSystemNameUpdated, size),
4950
Check: resource.ComposeTestCheckFunc(
5051
testAccCheckFileSystemExists(tt, "scaleway_file_filesystem.fs"),
51-
resource.TestCheckResourceAttr("scaleway_file_filesystem.fs", "size", fmt.Sprintf("%d", size)),
52+
resource.TestCheckResourceAttr("scaleway_file_filesystem.fs", "size", strconv.FormatInt(int64(size), 10)),
5253
),
5354
},
5455
},

0 commit comments

Comments
 (0)