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

gha test 1 #4

Merged
merged 1 commit into from
Jun 25, 2024
Merged
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ integration-test: create-integration-config create-e2e-firewall

create-e2e-firewall:
@echo "Running create e2e firewall playbook..."
@if e2e_scripts/cloud_security_scripts/cloud_e2e_firewall/ansible_linode/create_e2e_cloud_firewall.yaml > /dev/null; then \
@if ansible-playbook e2e_scripts/cloud_security_scripts/cloud_e2e_firewall/ansible_linode/create_e2e_cloud_firewall.yaml > /dev/null; then \
echo "Successfully created e2e firewall"; \
else \
echo "Failed to create e2e firewall"; \
fi

delete-e2e-firewall:
@echo "Running delete e2e firewall playbook..."
@if e2e_scripts/cloud_security_scripts/cloud_e2e_firewall/ansible_linode/delete_e2e_cloud_firewall.yaml > /dev/null; then \
@if ansible-playbook e2e_scripts/cloud_security_scripts/cloud_e2e_firewall/ansible_linode/delete_e2e_cloud_firewall.yaml > /dev/null; then \
echo "Successfully deleted e2e firewall"; \
else \
echo "Failed to delete e2e firewall"; \
Expand Down
21 changes: 6 additions & 15 deletions scripts/test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PARALLEL_JOBS="${PARALLEL_JOBS:=3}"

run_test() {
ANSIBLE_RETRY_FILES_ENABLED=false ansible-test integration $(TEST_ARGS)
ANSIBLE_RETRY_FILES_ENABLED=false ansible-test integration $1
}

cleanup() {
Expand All @@ -17,24 +17,15 @@ cleanup() {
trap cleanup EXIT

# Create integration_yaml
if ! make create-integration-config; then
echo "Failed to create integration config..."
exit 1
fi

if ! make create-e2e-firewall; then
echo "Failed to create e2e firewall..."
exit 1
fi
make create-integration-config
make create-e2e-firewall

export -f run_test

# Run tests in parallel
if ! parallel -j $PARALLEL_JOBS --group --keep-order run_test ::: $(ls tests/integration/targets); then
TEST_EXIT_CODE=$?
else
TEST_EXIT_CODE=0
fi
parallel -j $PARALLEL_JOBS --group --keep-order run_test ::: $(ls tests/integration/targets)
TEST_EXIT_CODE=$?


cleanup

Expand Down
Loading