Skip to content

Commit

Permalink
add datapusher service working test
Browse files Browse the repository at this point in the history
  • Loading branch information
avdata99 committed Mar 20, 2020
1 parent c13bf23 commit b42f959
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/production.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 10 additions & 0 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit b42f959

Please sign in to comment.