Skip to content

v0.2.48..v0.2.49 changeset ServicesDbListMapsCmdTest.sh

Garret Voltz edited this page Oct 2, 2019 · 1 revision
diff --git a/test-files/cmd/quick/ServicesDbListMapsCmdTest.sh b/test-files/cmd/quick/ServicesDbListMapsCmdTest.sh
new file mode 100755
index 0000000..754ac16
--- /dev/null
+++ b/test-files/cmd/quick/ServicesDbListMapsCmdTest.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -e
+
+EMAIL=DbListMapsCmdTest@hoottestcpp.org
+source conf/database/DatabaseConfig.sh
+HOOT_DB_URL="hootapidb://$DB_USER:$DB_PASSWORD@$DB_HOST:$DB_PORT/$DB_NAME"
+
+# add some maps for this user (delete any pre-existing)
+hoot convert --warn -D api.db.email=$EMAIL -D hootapi.db.writer.create.user=true -D hootapi.db.writer.overwrite.map=true test-files/ToyTestA.osm $HOOT_DB_URL/DbListMapsCmdTest1
+hoot convert --warn -D api.db.email=$EMAIL -D hootapi.db.writer.create.user=true -D hootapi.db.writer.overwrite.map=true test-files/ToyTestB.osm $HOOT_DB_URL/DbListMapsCmdTest2
+
+# list the maps (not dealing with public maps here; see ServiceHootApiDbTest)
+hoot db-list-maps --warn -D api.db.email=$EMAIL $HOOT_DB_URL
Clone this wiki locally