From b42f959c03a340c6e18ac7fd84fd335845d62862 Mon Sep 17 00:00:00 2001 From: Andres Vazquez Date: Fri, 20 Mar 2020 15:20:55 -0300 Subject: [PATCH] add datapusher service working test --- config/production.ini | 2 +- requirements.txt | 4 ++-- tests/test.bats | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/config/production.ini b/config/production.ini index bc717843..2dbbf996 100644 --- a/config/production.ini +++ b/config/production.ini @@ -103,7 +103,7 @@ solr_url = http://solr:8983/solr/inventory # original plugins # ckan.plugins = usmetadata datajson datastore datapusher stats text_view recline_view googleanalyticsbasic -ckan.plugins = googleanalyticsbasic datastore datapusher usmetadata datajson +ckan.plugins = googleanalyticsbasic datastore datapusher # Define which views should be created by default # (plugins must be loaded in ckan.plugins) diff --git a/requirements.txt b/requirements.txt index 9f4e407c..54221fb2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ --e git+https://github.com/ckan/ckan.git@ckan-2.8.3#egg=ckan +# -e git+https://github.com/ckan/ckan.git@ckan-2.8.3#egg=ckan # datapusher hotfix. CKAN has an error. # Fixed in master, need to port to CKAN 2.8.3 # https://github.com/ckan/ckan/pull/5281/files -# -e git+https://github.com/avdata99/ckan@my_2.8.3#egg=ckan +-e git+https://github.com/avdata99/ckan@my_2.8.3#egg=ckan -e git+https://github.com/GSA/ckanext-googleanalyticsbasic#egg=ckanext-googleanalyticsbasic -e git+https://github.com/datopian/USMetadata#egg=ckanext-usmetadata diff --git a/tests/test.bats b/tests/test.bats index c14fc215..655c6e09 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -104,3 +104,13 @@ function test_datastore_request () { return 1; fi } + +@test "datapusher working" { + datapusher_status=$(curl -X GET "http://datapusher:8800/status" | grep -o "push_to_datastore") + # {"job_types": ["push_to_datastore"], "name": "datapusher", "stats": {"complete": 0, "error": 0, "pending": 0}, "version": 0.1} + if [ "$datapusher_status" = "push_to_datastore" ]; then + return 0; + else + return 1; + fi +} \ No newline at end of file