Skip to content

Commit

Permalink
integration test draft
Browse files Browse the repository at this point in the history
  • Loading branch information
navrang9 committed Jun 17, 2024
1 parent 859d2cc commit bd4ce7d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,32 @@ jobs:
- name: Add TM1 connection to Airflow
run: |
DOCKID=$(docker ps -q --filter "name=tests_integration-airflow-webserver-1")
docker exec $DOCKID airflow connections add tm1_conn --conn-type tm1 --conn-login admin --conn-password admin --conn-host localhost --conn-port 5898 --conn-schema "" --conn-extra ""
DOCKID=$(docker ps -q --filter "name=tests_integration-airflow-worker-1")
docker exec -i $DOCKID /bin/bash <<-EOF
airflow connections get tm1_conn
echo "hello"
exit_status=$?
if [ $exit_status -eq 0 ]; then
docker exec $DOCKID airflow connections add tm1_conn --conn-type tm1 --conn-login admin --conn-password admin --conn-host tm1-centos7 --conn-port 5360 --conn-schema "" --conn-extra ""
else
echo "Connection already added"
fi
EOF
- name: Test Airflow TM1 provider
run: |
cd tests_integration
echo "Running tests..."
# TODO
DOCKID=$(docker ps -q --filter "name=tests_integration-airflow-worker-1")
docker exec -i $DOCKID /bin/bash <<-EOF
airflow dags test airflow_test_success_dag > logs/integration_test_airflow_test_success_dag.log
airflow dags test airflow_test_aborted_dag >> logs/integration_test_airflow_test_aborted_dag.log
airflow dags test airflow_test_data_error_dag >> logs/integration_test_airflow_test_data_error_dag.log
airflow dags test airflow_test_timeout_dag >> logs/integration_test_airflow_test_timeout_dag.log
EOF
- name: Stop docker containers
if: always()
run: |
cd tests_integration
docker compose down
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,5 @@ dmypy.json
*.swp
*.txt
logs/

my.secrets
8 changes: 8 additions & 0 deletions tests_integration/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,5 +298,13 @@ services:
- 5360:5360
command: bash -c "/docker-entrypoint.sh && tail -F /dev/null"

arc:
container_name: arc
image: knowledgeseed/arc-linux64
ports:
- 7070:7070
volumes:
- ./settings.yml:/settings.yml

volumes:
postgres-db-volume:

0 comments on commit bd4ce7d

Please sign in to comment.