Skip to content

Commit

Permalink
Use maven for integration tests which use Okapi CIRC-58
Browse files Browse the repository at this point in the history
  • Loading branch information
marcjohnson-kint committed Dec 31, 2017
1 parent 2fc815b commit 3b17a32
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test-via-okapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ circulation_storage_module_id="mod-circulation-storage-4.0.1-SNAPSHOT"
#Needs to be the specific version of mod-users you want to use for testing
users_storage_module_id="mod-users-14.3.0-SNAPSHOT"

#clean the build
gradle clean cleanTest
#remove log output
rm test-via-okapi.log

echo "Check if Okapi is contactable"
curl -w '\n' -X GET -D - \
Expand Down Expand Up @@ -52,7 +52,8 @@ curl -w '\n' -X POST -D - \
-d "${activate_inventory_storage_json}" \
"${okapi_proxy_address}/_/proxy/tenants/${tenant_id}/modules"

gradle generateDescriptors
echo "Generate Descriptors from Templates"
mvn clean compile -Dmaven.test.skip=true -q

echo "Register circulation module"
./okapi-registration/unmanaged-deployment/register.sh \
Expand All @@ -63,7 +64,10 @@ echo "Register circulation module"
${tenant_id}

echo "Run API tests"
gradle testApiViaOkapi
echo "Run tests via Okapi"
#Potentially move to use integration test phase
mvn -Dokapi.address="${okapi_proxy_address}" -Duse.okapi.initial.requests="true" \
-Duse.okapi.storage.requests="true" clean test | tee -a test-via-okapi.log

test_results=$?

Expand Down Expand Up @@ -94,7 +98,7 @@ if [ $test_results != 0 ]; then
exit 1;
else
echo '--------------------------------------'
echo 'BUILD SUCCEEDED'
echo 'BUILD REPORTED SUCCESS - Check test results via log (test-via-okapi.log)'
echo '--------------------------------------'
exit 1;
fi

0 comments on commit 3b17a32

Please sign in to comment.