From 6b2d3da5eb8a2bb3b99737420aa412d47d91ec00 Mon Sep 17 00:00:00 2001 From: Markus Scheidgen <markus.scheidgen@gmail.com> Date: Fri, 23 Nov 2018 13:49:49 +0100 Subject: [PATCH] Started on integration. Fixes to postgres use in CI. --- .gitlab-ci.yml | 1 + integration/build_coe_container.sh | 5 +++++ integration/test_integration.sh | 11 +++++++++++ linting.sh | 5 ----- nomad/config.py | 10 +++++----- 5 files changed, 22 insertions(+), 10 deletions(-) create mode 100755 integration/build_coe_container.sh create mode 100644 integration/test_integration.sh delete mode 100755 linting.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95a3a826e9..699bed2422 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,6 +77,7 @@ tests: RABBITMQ_DEFAULT_USER: rabbitmq RABBITMQ_DEFAULT_PASS: rabbitmq RABBITMQ_DEFAULT_VHOST: / + NOMAD_COE_REPO_DB_HOST: postgres NOMAD_RABBITMQ_HOST: rabbitmq NOMAD_ELASTIC_HOST: elastic NOMAD_MONGO_HOST: mongo diff --git a/integration/build_coe_container.sh b/integration/build_coe_container.sh new file mode 100755 index 0000000000..e006928162 --- /dev/null +++ b/integration/build_coe_container.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cd .dependencies/nomad-lab-base +sbt docker repoTool +sbt docker repoWebservice \ No newline at end of file diff --git a/integration/test_integration.sh b/integration/test_integration.sh new file mode 100644 index 0000000000..a7f80109dc --- /dev/null +++ b/integration/test_integration.sh @@ -0,0 +1,11 @@ +# import example calculations +nomad upload --unstage tests/data/proc/examles_vasp.zip + +# create a new index with coe repoTool +docker run nomad/coe-repotool:latest + +# start coe repoServer +docker run nomad/coe-repowebservice:latest + +# try to search for new calculations +curl localhost:8111/... \ No newline at end of file diff --git a/linting.sh b/linting.sh deleted file mode 100755 index d03049890f..0000000000 --- a/linting.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -python -m pycodestyle --ignore=E501,E701 nomad tests -python -m pylint --load-plugins=pylint_mongoengine nomad tests -python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional nomad tests \ No newline at end of file diff --git a/nomad/config.py b/nomad/config.py index cd43ab17cf..ac20c655bc 100644 --- a/nomad/config.py +++ b/nomad/config.py @@ -84,11 +84,11 @@ elastic = ElasticConfig( calc_index='calcs' ) repository_db = RepositoryDBConfig( - host=os.environ.get('NOMAD_REPOSITORY_DB_HOST', 'localhost'), - port=int(os.environ.get('NOMAD_REPOSITORY_DB_PORT', 5432)), - dbname=os.environ.get('NOMAD_REPOSITORY_DB_NAME', 'nomad'), - user=os.environ.get('NOMAD_REPOSITORY_DB_USER', 'postgres'), - password=os.environ.get('NOMAD_REPOSITORY_DB_PASSWORD', 'nomad') + host=os.environ.get('NOMAD_COE_REPO_DB_HOST', 'localhost'), + port=int(os.environ.get('NOMAD_COE_REPO_DB_PORT', 5432)), + dbname=os.environ.get('NOMAD_COE_REPO_DB_NAME', 'nomad'), + user=os.environ.get('NOMAD_COE_REPO_DB_USER', 'postgres'), + password=os.environ.get('NOMAD_COE_REPO_PASSWORD', 'nomad') ) mongo = MongoConfig( host=os.environ.get('NOMAD_MONGO_HOST', 'localhost'), -- GitLab