From 7b23976f993471fe7f933f3784ffbe537560b371 Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Fri, 14 Nov 2025 15:34:28 +0100 Subject: [PATCH 1/2] docs(srv): update docs on testing resources MTA-6725 --- pages/serverless-containers/how-to/test-a-container.mdx | 4 ++-- .../troubleshooting/tests-fail-on-container.mdx | 2 +- pages/serverless-functions/how-to/test-a-function.mdx | 4 +++- .../troubleshooting/tests-fail-on-function.mdx | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pages/serverless-containers/how-to/test-a-container.mdx b/pages/serverless-containers/how-to/test-a-container.mdx index dfce1d4bd1..14609f3c9d 100644 --- a/pages/serverless-containers/how-to/test-a-container.mdx +++ b/pages/serverless-containers/how-to/test-a-container.mdx @@ -35,9 +35,9 @@ Testing **Private** Serverless Functions is not possible using the Scaleway cons 7. Click **+ Advanced options** to add any required HTTP header or parameter to your container. -8. Click **Run**. +8. Copy the generated command, then execute it in a terminal. -The **Output** section displays the response from your container and the status code. +The output of your terminal displays the response from your container, and the status code. If you encounter a message error while testing your container, refer to the [dedicated troubleshooting](/serverless-containers/troubleshooting/tests-fail-on-container/) for more information. diff --git a/pages/serverless-containers/troubleshooting/tests-fail-on-container.mdx b/pages/serverless-containers/troubleshooting/tests-fail-on-container.mdx index d1d8f022b3..9d36f25b66 100644 --- a/pages/serverless-containers/troubleshooting/tests-fail-on-container.mdx +++ b/pages/serverless-containers/troubleshooting/tests-fail-on-container.mdx @@ -13,7 +13,7 @@ I get error messages when testing Serverless Containers using the Scaleway Conso ## Cause -Testing **Private** Serverless Containers is not possible using the Scaleway console due to CORS limitations. +**Private** Serverless Containers require you use an authentication token. ## Possible solutions diff --git a/pages/serverless-functions/how-to/test-a-function.mdx b/pages/serverless-functions/how-to/test-a-function.mdx index b32de54a0c..756d2615dd 100644 --- a/pages/serverless-functions/how-to/test-a-function.mdx +++ b/pages/serverless-functions/how-to/test-a-function.mdx @@ -35,7 +35,9 @@ Testing **Private** Serverless Functions is not possible using the Scaleway cons 7. Click **+ Advanced options** to add any required HTTP header or parameter to your function. -8. Click **Run**. +8. Copy the generated command, then execute it in a terminal. + +The output of your terminal displays the response from your function, and the status code. The **Output** section displays the response from your function and the status code. diff --git a/pages/serverless-functions/troubleshooting/tests-fail-on-function.mdx b/pages/serverless-functions/troubleshooting/tests-fail-on-function.mdx index 7b4f5c5382..0154a29dce 100644 --- a/pages/serverless-functions/troubleshooting/tests-fail-on-function.mdx +++ b/pages/serverless-functions/troubleshooting/tests-fail-on-function.mdx @@ -13,7 +13,7 @@ I get error messages when testing Serverless Functions using the Scaleway Consol ## Cause -Testing **Private** Serverless Functions is not possible using the Scaleway console due to CORS limitations. +**Private** Serverless Functions require you use an authentication token. ## Possible solutions From d4fd6cfe85c5ea4230722f51f084f0596da57aee Mon Sep 17 00:00:00 2001 From: Samy OUBOUAZIZ Date: Mon, 17 Nov 2025 15:02:01 +0100 Subject: [PATCH 2/2] docs(srv): update doc on testing resource --- .../how-to/test-a-container.mdx | 13 +++++++++---- .../troubleshooting/tests-fail-on-container.mdx | 3 ++- .../how-to/test-a-function.mdx | 15 +++++++++------ .../troubleshooting/tests-fail-on-function.mdx | 3 ++- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/pages/serverless-containers/how-to/test-a-container.mdx b/pages/serverless-containers/how-to/test-a-container.mdx index 14609f3c9d..c1d0ca83bc 100644 --- a/pages/serverless-containers/how-to/test-a-container.mdx +++ b/pages/serverless-containers/how-to/test-a-container.mdx @@ -11,10 +11,6 @@ import Requirements from '@macros/iam/requirements.mdx' This page shows you how to execute Serverless Containers from the [Scaleway console](https://console.scaleway.com). The **Test** feature of a container allows you to run your code using a selection of methods to make sure it behaves as expected. - -Testing **Private** Serverless Functions is not possible using the Scaleway console due to CORS limitations. Refer to the [dedicated documentation](/serverless-containers/how-to/create-auth-token-from-console/) for more information on how to secure and test a private function. - - - A Scaleway account logged into the [console](https://console.scaleway.com) @@ -37,6 +33,15 @@ Testing **Private** Serverless Functions is not possible using the Scaleway cons 8. Copy the generated command, then execute it in a terminal. + + Testing a private container requires you use an [authentication token](/serverless-containers/how-to/create-auth-token-from-console/) as a header, as shown below: + + ```bash + export $TOKEN= + curl -H "X-Auth-Token: $TOKEN" \ + ```` + + The output of your terminal displays the response from your container, and the status code. diff --git a/pages/serverless-containers/troubleshooting/tests-fail-on-container.mdx b/pages/serverless-containers/troubleshooting/tests-fail-on-container.mdx index 9d36f25b66..ada3cfe422 100644 --- a/pages/serverless-containers/troubleshooting/tests-fail-on-container.mdx +++ b/pages/serverless-containers/troubleshooting/tests-fail-on-container.mdx @@ -21,5 +21,6 @@ I get error messages when testing Serverless Containers using the Scaleway Conso - Make sure you have created an [authentication token](/serverless-containers/how-to/create-auth-token-from-console/) for your private function, then execute a `curl` request from a terminal, as shown below: ```bash - curl -H "X-Auth-Token: " \ + export $TOKEN= + curl -H "X-Auth-Token: $TOKEN" \ ``` \ No newline at end of file diff --git a/pages/serverless-functions/how-to/test-a-function.mdx b/pages/serverless-functions/how-to/test-a-function.mdx index 756d2615dd..ed2c901491 100644 --- a/pages/serverless-functions/how-to/test-a-function.mdx +++ b/pages/serverless-functions/how-to/test-a-function.mdx @@ -11,10 +11,6 @@ import Requirements from '@macros/iam/requirements.mdx' This page shows you how to execute Serverless Functions from the [Scaleway console](https://console.scaleway.com). The **Test** feature of a function allows you to run your code using a selection of methods to make sure it behaves as expected. - -Testing **Private** Serverless Functions is not possible using the Scaleway console due to CORS limitations. Refer to the [dedicated documentation](/serverless-functions/how-to/create-auth-token-from-console/) for more information on how to secure and test a private function. - - - A Scaleway account logged into the [console](https://console.scaleway.com) @@ -37,9 +33,16 @@ Testing **Private** Serverless Functions is not possible using the Scaleway cons 8. Copy the generated command, then execute it in a terminal. -The output of your terminal displays the response from your function, and the status code. + + Testing a private function requires you use an [authentication token](/serverless-functions/how-to/create-auth-token-from-console/) as a header, as shown below: -The **Output** section displays the response from your function and the status code. + ```bash + export $TOKEN= + curl -H "X-Auth-Token: $TOKEN" \ + ```` + + +The output of your terminal displays the response from your function, and the status code. If you encounter a message error while testing your function, refer to the [dedicated troubleshooting](/serverless-functions/troubleshooting/tests-fail-on-function/) for more information. diff --git a/pages/serverless-functions/troubleshooting/tests-fail-on-function.mdx b/pages/serverless-functions/troubleshooting/tests-fail-on-function.mdx index 0154a29dce..f892f15463 100644 --- a/pages/serverless-functions/troubleshooting/tests-fail-on-function.mdx +++ b/pages/serverless-functions/troubleshooting/tests-fail-on-function.mdx @@ -21,5 +21,6 @@ I get error messages when testing Serverless Functions using the Scaleway Consol - Make sure you have created an [authentication token](/serverless-functions/how-to/create-auth-token-from-console/) for your private function, then execute a `curl` request from a terminal, as shown below: ```bash - curl -H "X-Auth-Token: " \ + export $TOKEN= + curl -H "X-Auth-Token: $TOKEN" \ ``` \ No newline at end of file