Skip to content

Commit

Permalink
Merge pull request #4 from ykim-1/test/use_single_instance_of_config_…
Browse files Browse the repository at this point in the history
…yaml

gha test 1
  • Loading branch information
ykim-akamai authored Jun 25, 2024
2 parents b71bbab + 7efb52b commit b1e7840
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
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

0 comments on commit b1e7840

Please sign in to comment.