From 79536f3d81d5117e4a787ae1be2714bd09c9c4a2 Mon Sep 17 00:00:00 2001 From: jrybicki-jsc <j.rybicki@fz-juelich.de> Date: Wed, 1 Sep 2021 11:40:52 +0200 Subject: [PATCH] testing step2 --- README.md | 5 ++++- tests/test_b2shareoperator.py | 2 +- tests/test_dag.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 666a106..323709e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ eFlows4HPC Data Logistics Service ``` mkdir ./logs ./plugins echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env -echo "_PIP_ADDITIONAL_REQUIREMENTS=urllib3==1.26.6" >> .env +reqs=`cat requirements.txt | tr '\n' ' '` +echo "_PIP_ADDITIONAL_REQUIREMENTS=$reqs" >> .env docker-compose -f dockers/docker-compose.yaml --project-directory . up airflow-init ``` @@ -16,5 +17,7 @@ docker-compose -f dockers/docker-compose.yaml --project-directory . up -d ``` ## Setup connection +``` curl -X POST -u creds -H "Content-Type: application/json" --data '{"connection_id": "default_b2share","conn_type":"https", "host": "b2share-testing.fz-juelich.de", "schema":""}' localhost:7001/api/v1/connections +``` diff --git a/tests/test_b2shareoperator.py b/tests/test_b2shareoperator.py index 6d9adf2..118b8af 100644 --- a/tests/test_b2shareoperator.py +++ b/tests/test_b2shareoperator.py @@ -9,7 +9,7 @@ TEST_DAG_ID = 'test_my_custom_operator' class B2ShareOperatorTest(unittest.TestCase): def setUp(self): - self.dag = DAG(TEST_DAG_ID, schedule_interval='@daily', default_args={'start_date' : DEFAULT_DATE}) + self.dag = DAG(TEST_DAG_ID, schedule_interval='@daily',name='testing_dag', default_args={'start_date' : DEFAULT_DATE}) self.op = B2ShareOperator( dag=self.dag, task_id='test', diff --git a/tests/test_dag.py b/tests/test_dag.py index cfc812e..08c39ad 100644 --- a/tests/test_dag.py +++ b/tests/test_dag.py @@ -10,4 +10,4 @@ class TestADag(unittest.TestCase): dag = self.dagbag.get_dag(dag_id='firsto') assert self.dagbag.import_errors == {} assert dag is not None - assert len(dag.tasks) == 1 \ No newline at end of file + assert len(dag.tasks) == 4 \ No newline at end of file -- GitLab