Skip to content
Snippets Groups Projects
Commit 2f61316c authored by Maria Petrova-El Sayed's avatar Maria Petrova-El Sayed
Browse files

Parameterize user and pass in testing

parent 0a821bfa
Branches
Tags
No related merge requests found
Pipeline #85711 failed
...@@ -10,6 +10,7 @@ variables: ...@@ -10,6 +10,7 @@ variables:
OLD_TEST_NAME: old-airflow-test OLD_TEST_NAME: old-airflow-test
TESTING_NAME: airflow-testing TESTING_NAME: airflow-testing
TESTING_URL: http://134.94.199.220:7001/home TESTING_URL: http://134.94.199.220:7001/home
AIRFLOW_TESTUSER: "airflow"
# before script copied from gitlab docs # before script copied from gitlab docs
before_script: &ssh_setup before_script: &ssh_setup
...@@ -47,7 +48,6 @@ test: ...@@ -47,7 +48,6 @@ test:
full-deploy-test: full-deploy-test:
stage: deploy stage: deploy
environment: Testing environment: Testing
# when: manual
only: only:
- web - web
script: script:
...@@ -63,18 +63,18 @@ full-deploy-test: ...@@ -63,18 +63,18 @@ full-deploy-test:
test-testing_dags: test-testing_dags:
cache: {} cache: {}
stage: test-deployment stage: test-deployment
# only: only:
# - master - web # and master
except: except:
- tags - tags
script: script:
- apt update && apt -y install curl - apt update && apt -y install curl
- echo "This is a simple check if the deploments was successful and dags get executed" - echo "This is a simple check if the deploments was successful and dags get executed"
- sleep 150 # ensure that the docker containers are up and running before testing the airflow installation - sleep 60 # ensure that the docker containers are up and running before testing the airflow installation
- 'curl --insecure -I -H "Accept: application/json" $TESTING_URL' - 'curl --insecure -I -H "Accept: application/json" $TESTING_URL'
- 'curl -X GET -u airflow:airflow -H "Content-Type: application/json" $TEST_IP:7001/api/v1/dags' - 'curl -X GET -u $AIRFLOW_TESTUSER:$AIRFLOW_TESTUSER_PASS -H "Content-Type: application/json" $TEST_IP:7001/api/v1/dags'
- 'curl -X GET -u airflow:airflow -H "Content-Type: application/json" $TEST_IP:7001/api/v1/connections' - 'curl -X GET -u $AIRFLOW_TESTUSER:$AIRFLOW_TESTUSER_PASS -H "Content-Type: application/json" $TEST_IP:7001/api/v1/connections'
- 'curl -X POST -u airflow:airflow -H "Content-Type: application/json" --data {} $TEST_IP:7001/api/v1/dags/testdag/dagRuns' - 'curl -X POST -u $AIRFLOW_TESTUSER:$AIRFLOW_TESTUSER_PASS -H "Content-Type: application/json" --data {} $TEST_IP:7001/api/v1/dags/testdag/dagRuns'
cleanup-successful-full-deployment: cleanup-successful-full-deployment:
# check if there is an old prod or test instance, and delete it if present # check if there is an old prod or test instance, and delete it if present
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment