Skip to content

Commit 4904442

Browse files
committed
test(integrations): use current version when vendoring in tests
1 parent 10f8db4 commit 4904442

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

tests/app_fixtures/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
${SCW_SERVERLESS_FOLDER}

tests/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
GATEWAY_S3_BUCKET_NAME = os.getenv("GATEWAY_S3_BUCKET_NAME")
1919

2020
TESTS_DIR = os.path.realpath(os.path.dirname(__file__))
21+
PROJECT_DIR = Path(TESTS_DIR).parent
2122

2223
APP_FIXTURES_PATH = Path(TESTS_DIR, "app_fixtures")
2324

tests/integrations/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,14 @@ def run_deploy_command(
3939
dst=cwd,
4040
dirs_exist_ok=True,
4141
)
42+
4243
return cli_runner.invoke(
4344
deploy,
4445
args=(args or []) + [str(cwd / app_path.name)],
46+
# When vendoring scw-serverless to install it on Scaleway Functions,
47+
# we use the version being tested. This is achieved by passing the absolute path
48+
# to the project in the requirements.txt file.
49+
env={"SCW_SERVERLESS_FOLDER": str(constants.PROJECT_DIR)},
4550
catch_exceptions=False,
4651
)
4752

0 commit comments

Comments
 (0)