summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/docker/Dockerfile1
-rw-r--r--scripts/docker/Makefile7
-rwxr-xr-xscripts/docker/files/start-trial-test.sh19
3 files changed, 27 insertions, 0 deletions
diff --git a/scripts/docker/Dockerfile b/scripts/docker/Dockerfile
index 24bfff30..8b7dcb71 100644
--- a/scripts/docker/Dockerfile
+++ b/scripts/docker/Dockerfile
@@ -39,4 +39,5 @@ COPY files/client_side_db.py /usr/local/soledad/
COPY files/util.py /usr/local/soledad/
COPY files/start-server.sh /usr/local/soledad/
COPY files/start-client-test.sh /usr/local/soledad/
+COPY files/start-trial-test.sh /usr/local/soledad/
COPY files/conf/* /usr/local/soledad/conf/
diff --git a/scripts/docker/Makefile b/scripts/docker/Makefile
index 9b9ab8f7..872bdc40 100644
--- a/scripts/docker/Makefile
+++ b/scripts/docker/Makefile
@@ -50,6 +50,13 @@ run-client-test:
$(IMAGE_NAME) \
/usr/local/soledad/start-client-test.sh
+run-trial-test:
+ docker run -t -i \
+ --env="SOLEDAD_REMOTE=$(SOLEDAD_REMOTE)" \
+ --env="SOLEDAD_BRANCH=$(SOLEDAD_BRANCH)" \
+ $(IMAGE_NAME) \
+ /usr/local/soledad/start-trial-test.sh
+
run-shell: image
docker run -t -i $(IMAGE_NAME) /bin/bash
diff --git a/scripts/docker/files/start-trial-test.sh b/scripts/docker/files/start-trial-test.sh
new file mode 100755
index 00000000..98b09e53
--- /dev/null
+++ b/scripts/docker/files/start-trial-test.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Run Soledad tests.
+
+CMD="/usr/local/soledad/test-env.py"
+REPO="/var/local/soledad"
+
+if [ ! -z "${SOLEDAD_REMOTE}" ]; then
+ git -C ${REPO} remote add test ${SOLEDAD_REMOTE}
+ git -C ${REPO} fetch test
+fi
+
+if [ ! -z "${SOLEDAD_BRANCH}" ]; then
+ git -C ${REPO} checkout ${SOLEDAD_BRANCH}
+fi
+
+${CMD} couch start
+
+trial leap.soledad.common