Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test sqs test selection #10785

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ commands:
command: |
if [[ -n "$CI_PULL_REQUEST" ]] ; then
echo "export TESTSELECTION_PYTEST_ARGS='--path-filter=target/testselection/test-selection.txt '" >> $BASH_ENV
cat target/testselection/test-selection.txt
fi
- run:
name: Setup Environment Variables
Expand Down
4 changes: 3 additions & 1 deletion localstack/services/sqs/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,9 @@ def _get_and_serialize_messages(
queue, show_invisible=show_invisible, show_delayed=show_delayed
)

return ReceiveMessageResult(Messages=messages)
return (
ReceiveMessageResult(Messages=messages) or None
) # This is a dummy line to trigger the test selection

def _collect_messages(
self, queue: SqsQueue, show_invisible: bool = False, show_delayed: bool = False
Expand Down
1 change: 1 addition & 0 deletions localstack/testing/pytest/path_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def pytest_collection_modifyitems(config, items):

# Update list of test items to only those selected
items[:] = selected
print(f"selected: {selected}, \ndeselected: {deselected}")
config.hook.pytest_deselected(items=deselected)


Expand Down
3 changes: 3 additions & 0 deletions localstack/testing/testselection/opt_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
# SSM
"localstack/services/ssm/**",
"tests/aws/services/ssm/**",
# SQS
"localstack/services/sqs/**",
"tests/aws/services/sqs/**",
]


Expand Down
2 changes: 2 additions & 0 deletions tests/aws/services/sqs/test_sqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4860,3 +4860,5 @@ def test_delete_queue_multi_account(
client2_http.post(queue2_url, params={"Action": "DeleteQueue"})
assert response.ok
assert len(client2.list_queues(QueueNamePrefix=prefix).get("QueueUrls", [])) == 0

# test comment to trigger test_selection
Loading