Skip to content

add fix for CLI tests to properly set CLI context #7939

Merged
thrau merged 3 commits intov2from
v2-fix-cli-tests
Mar 23, 2023
Merged

add fix for CLI tests to properly set CLI context #7939
thrau merged 3 commits intov2from
v2-fix-cli-tests

Conversation

@thrau
Copy link
Member

@thrau thrau commented Mar 23, 2023

without setting LOCALSTACK_CLI=1, the config.dirs are not set to the CLI directories, but the the host-mode directories using .filesystem.

def init_directories() -> Directories:
if is_in_docker:
return Directories.for_container()
else:
if is_env_true("LOCALSTACK_CLI"):
return Directories.for_cli()
return Directories.for_host()

we are setting LOCALSTACK_CLI=1 here, but this is never called in the tests:

def main():
# indicate to the environment we are starting from the CLI
os.environ["LOCALSTACK_CLI"] = "1"

@thrau thrau requested a review from alexrashed March 23, 2023 13:49
@thrau thrau temporarily deployed to localstack-ext-tests March 23, 2023 13:49 — with GitHub Actions Inactive
Copy link
Member

@alexrashed alexrashed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@thrau thrau temporarily deployed to localstack-ext-tests March 23, 2023 13:57 — with GitHub Actions Inactive
@github-actions
Copy link

LocalStack integration with Pro

1 827 tests   - 1   1 480 ✔️  - 1   1h 3m 50s ⏱️ - 2m 25s
       1 suites ±0      346 💤 ±0 
       1 files   ±0          1 ±0 

For more details on these failures, see this check.

Results for commit 941c454. ± Comparison against base commit a12e673.

@thrau thrau temporarily deployed to localstack-ext-tests March 23, 2023 15:31 — with GitHub Actions Inactive
@thrau thrau merged commit 0f750ae into v2 Mar 23, 2023
@thrau thrau deleted the v2-fix-cli-tests branch March 23, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants