Skip to content

Commit a29f7f9

Browse files
cyclimseCodelax
andauthored
chore(function): bump default memory limit (#2651)
* chore(function): bump default memory limit * update tests and cassettes * update datasource test and cassette --------- Co-authored-by: Jules Casteran <[email protected]>
1 parent 96aeffa commit a29f7f9

22 files changed

+25378
-20186
lines changed

internal/services/function/cron_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestAccFunctionCron_Basic(t *testing.T) {
3030
resource scaleway_function main {
3131
name = "tf-tests-cron-basic"
3232
namespace_id = scaleway_function_namespace.main.id
33-
runtime = "node14"
33+
runtime = "node20"
3434
privacy = "private"
3535
handler = "handler.handle"
3636
}
@@ -70,7 +70,7 @@ func TestAccFunctionCron_NameUpdate(t *testing.T) {
7070
resource scaleway_function main {
7171
name = "tf-tests-function-cron-name-update"
7272
namespace_id = scaleway_function_namespace.main.id
73-
runtime = "node14"
73+
runtime = "node20"
7474
privacy = "private"
7575
handler = "handler.handle"
7676
}
@@ -97,7 +97,7 @@ func TestAccFunctionCron_NameUpdate(t *testing.T) {
9797
resource scaleway_function main {
9898
name = "tf-tests-function-cron-name-update"
9999
namespace_id = scaleway_function_namespace.main.id
100-
runtime = "node14"
100+
runtime = "node20"
101101
privacy = "private"
102102
handler = "handler.handle"
103103
}
@@ -136,7 +136,7 @@ func TestAccFunctionCron_WithArgs(t *testing.T) {
136136
resource scaleway_function main {
137137
name = "tf-tests-cron-with-args"
138138
namespace_id = scaleway_function_namespace.main.id
139-
runtime = "node14"
139+
runtime = "node20"
140140
privacy = "private"
141141
handler = "handler.handle"
142142
}

internal/services/function/data_source_function_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func TestAccDataSourceFunction_Basic(t *testing.T) {
2525
resource scaleway_function main {
2626
name = "tf-ds-function"
2727
namespace_id = scaleway_function_namespace.main.id
28-
runtime = "node14"
28+
runtime = "node22"
2929
privacy = "private"
3030
handler = "handler.handle"
3131
}
@@ -44,7 +44,7 @@ func TestAccDataSourceFunction_Basic(t *testing.T) {
4444
resource scaleway_function main {
4545
name = "tf-ds-function"
4646
namespace_id = scaleway_function_namespace.main.id
47-
runtime = "node14"
47+
runtime = "node22"
4848
privacy = "private"
4949
handler = "handler.handle"
5050
}

internal/services/function/domain_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestAccFunctionDomain_Basic(t *testing.T) {
3232
3333
resource scaleway_function main {
3434
namespace_id = scaleway_function_namespace.main.id
35-
runtime = "go118"
35+
runtime = "go122"
3636
privacy = "private"
3737
handler = "Handle"
3838
zip_file = "testfixture/gofunction.zip"
@@ -47,7 +47,7 @@ func TestAccFunctionDomain_Basic(t *testing.T) {
4747
4848
resource scaleway_function main {
4949
namespace_id = scaleway_function_namespace.main.id
50-
runtime = "go118"
50+
runtime = "go122"
5151
privacy = "private"
5252
handler = "Handle"
5353
zip_file = "testfixture/gofunction.zip"

internal/services/function/function.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ func ResourceFunction() *schema.Resource {
104104
},
105105
"memory_limit": {
106106
Type: schema.TypeInt,
107-
Description: "Memory limit in MB for your function, defaults to 128MB",
107+
Description: "Memory limit in MB for your function, defaults to 256MB",
108108
Optional: true,
109-
Default: 128,
109+
Default: 256,
110110
},
111111
"handler": {
112112
Type: schema.TypeString,

internal/services/function/function_test.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ func TestAccFunction_Basic(t *testing.T) {
2828
resource scaleway_function main {
2929
name = "foobar"
3030
namespace_id = scaleway_function_namespace.main.id
31-
runtime = "node14"
31+
runtime = "node22"
3232
privacy = "private"
3333
handler = "handler.handle"
3434
}
3535
`,
3636
Check: resource.ComposeTestCheckFunc(
3737
testAccCheckFunctionExists(tt, "scaleway_function.main"),
3838
resource.TestCheckResourceAttr("scaleway_function.main", "name", "foobar"),
39-
resource.TestCheckResourceAttr("scaleway_function.main", "runtime", "node14"),
39+
resource.TestCheckResourceAttr("scaleway_function.main", "runtime", "node22"),
4040
resource.TestCheckResourceAttr("scaleway_function.main", "privacy", "private"),
4141
resource.TestCheckResourceAttr("scaleway_function.main", "handler", "handler.handle"),
4242
resource.TestCheckResourceAttrSet("scaleway_function.main", "namespace_id"),
@@ -63,7 +63,7 @@ func TestAccFunction_Timeout(t *testing.T) {
6363
resource scaleway_function main {
6464
name = "foobar"
6565
namespace_id = scaleway_function_namespace.main.id
66-
runtime = "node14"
66+
runtime = "node22"
6767
privacy = "private"
6868
handler = "handler.handle"
6969
timeout = 10
@@ -72,7 +72,7 @@ func TestAccFunction_Timeout(t *testing.T) {
7272
Check: resource.ComposeTestCheckFunc(
7373
testAccCheckFunctionExists(tt, "scaleway_function.main"),
7474
resource.TestCheckResourceAttr("scaleway_function.main", "name", "foobar"),
75-
resource.TestCheckResourceAttr("scaleway_function.main", "runtime", "node14"),
75+
resource.TestCheckResourceAttr("scaleway_function.main", "runtime", "node22"),
7676
resource.TestCheckResourceAttr("scaleway_function.main", "privacy", "private"),
7777
resource.TestCheckResourceAttr("scaleway_function.main", "handler", "handler.handle"),
7878
resource.TestCheckResourceAttr("scaleway_function.main", "timeout", "10"),
@@ -97,7 +97,7 @@ func TestAccFunction_NoName(t *testing.T) {
9797
9898
resource scaleway_function main {
9999
namespace_id = scaleway_function_namespace.main.id
100-
runtime = "node14"
100+
runtime = "node22"
101101
privacy = "private"
102102
handler = "handler.handle"
103103
}
@@ -127,7 +127,7 @@ func TestAccFunction_EnvironmentVariables(t *testing.T) {
127127
resource scaleway_function main {
128128
name = "foobar"
129129
namespace_id = scaleway_function_namespace.main.id
130-
runtime = "node14"
130+
runtime = "node22"
131131
privacy = "private"
132132
handler = "handler.handle"
133133
environment_variables = {
@@ -152,7 +152,7 @@ func TestAccFunction_EnvironmentVariables(t *testing.T) {
152152
resource scaleway_function main {
153153
name = "foobar"
154154
namespace_id = scaleway_function_namespace.main.id
155-
runtime = "node14"
155+
runtime = "node22"
156156
privacy = "private"
157157
handler = "handler.handle"
158158
environment_variables = {
@@ -190,7 +190,7 @@ func TestAccFunction_Upload(t *testing.T) {
190190
resource scaleway_function main {
191191
name = "foobar"
192192
namespace_id = scaleway_function_namespace.main.id
193-
runtime = "go118"
193+
runtime = "go122"
194194
privacy = "private"
195195
handler = "Handle"
196196
zip_file = "testfixture/gofunction.zip"
@@ -220,7 +220,7 @@ func TestAccFunction_Deploy(t *testing.T) {
220220
resource scaleway_function main {
221221
name = "foobar"
222222
namespace_id = scaleway_function_namespace.main.id
223-
runtime = "go118"
223+
runtime = "go122"
224224
privacy = "private"
225225
handler = "Handle"
226226
zip_file = "testfixture/gofunction.zip"
@@ -238,7 +238,7 @@ func TestAccFunction_Deploy(t *testing.T) {
238238
resource scaleway_function main {
239239
name = "foobar"
240240
namespace_id = scaleway_function_namespace.main.id
241-
runtime = "go118"
241+
runtime = "go122"
242242
privacy = "private"
243243
handler = "Handle"
244244
zip_file = "testfixture/gofunction.zip"
@@ -270,7 +270,7 @@ func TestAccFunction_HTTPOption(t *testing.T) {
270270
resource scaleway_function main {
271271
name = "foobar"
272272
namespace_id = scaleway_function_namespace.main.id
273-
runtime = "node14"
273+
runtime = "node22"
274274
privacy = "private"
275275
handler = "handler.handle"
276276
http_option = "enabled"
@@ -288,7 +288,7 @@ func TestAccFunction_HTTPOption(t *testing.T) {
288288
resource scaleway_function main {
289289
name = "foobar"
290290
namespace_id = scaleway_function_namespace.main.id
291-
runtime = "node14"
291+
runtime = "node22"
292292
privacy = "private"
293293
handler = "handler.handle"
294294
http_option = "redirected"
@@ -306,7 +306,7 @@ func TestAccFunction_HTTPOption(t *testing.T) {
306306
resource scaleway_function main {
307307
name = "foobar"
308308
namespace_id = scaleway_function_namespace.main.id
309-
runtime = "node14"
309+
runtime = "node22"
310310
privacy = "private"
311311
handler = "handler.handle"
312312
}

0 commit comments

Comments
 (0)