Skip to content
Snippets Groups Projects
Commit 79536f3d authored by Jedrzej Rybicki's avatar Jedrzej Rybicki
Browse files

testing step2

parent d7a73b26
No related branches found
No related tags found
No related merge requests found
Pipeline #77453 failed
...@@ -6,7 +6,8 @@ eFlows4HPC Data Logistics Service ...@@ -6,7 +6,8 @@ eFlows4HPC Data Logistics Service
``` ```
mkdir ./logs ./plugins mkdir ./logs ./plugins
echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env 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 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 ...@@ -16,5 +17,7 @@ docker-compose -f dockers/docker-compose.yaml --project-directory . up -d
``` ```
## Setup connection ## 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 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
```
...@@ -9,7 +9,7 @@ TEST_DAG_ID = 'test_my_custom_operator' ...@@ -9,7 +9,7 @@ TEST_DAG_ID = 'test_my_custom_operator'
class B2ShareOperatorTest(unittest.TestCase): class B2ShareOperatorTest(unittest.TestCase):
def setUp(self): 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( self.op = B2ShareOperator(
dag=self.dag, dag=self.dag,
task_id='test', task_id='test',
......
...@@ -10,4 +10,4 @@ class TestADag(unittest.TestCase): ...@@ -10,4 +10,4 @@ class TestADag(unittest.TestCase):
dag = self.dagbag.get_dag(dag_id='firsto') dag = self.dagbag.get_dag(dag_id='firsto')
assert self.dagbag.import_errors == {} assert self.dagbag.import_errors == {}
assert dag is not None assert dag is not None
assert len(dag.tasks) == 1 assert len(dag.tasks) == 4
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment