File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,31 @@ func TestAccFileSystem_InvalidSizeGranularityFails(t *testing.T) {
106106 })
107107}
108108
109+ func TestAccFileSystem_InvalidSizeGranularityFails (t * testing.T ) {
110+ tt := acctest .NewTestTools (t )
111+ defer tt .Cleanup ()
112+
113+ fileSystemName := "TestAccFileSystem_Basic"
114+ size := int64 (25_000_000_000 )
115+
116+ resource .ParallelTest (t , resource.TestCase {
117+ PreCheck : func () { acctest .PreCheck (t ) },
118+ ProviderFactories : tt .ProviderFactories ,
119+ CheckDestroy : filetestfuncs .CheckFileDestroy (tt ),
120+ Steps : []resource.TestStep {
121+ {
122+ Config : fmt .Sprintf (`
123+ resource "scaleway_file_filesystem" "fs" {
124+ name = "%s"
125+ size = %d
126+ }
127+ ` , fileSystemName , size ),
128+ ExpectError : regexp .MustCompile ("size does not respect constraint, size must be greater or equal to 100000000000" ),
129+ },
130+ },
131+ })
132+ }
133+
109134func testAccCheckFileSystemExists (tt * acctest.TestTools , n string ) resource.TestCheckFunc {
110135 return func (s * terraform.State ) error {
111136 rs , ok := s .RootModule ().Resources [n ]
You can’t perform that action at this time.
0 commit comments