diff --git a/persistence-modules/spring-data-mongodb/LIVE-TEST.md b/persistence-modules/spring-data-mongodb/LIVE-TEST.md new file mode 100644 index 0000000000..9da1ea249e --- /dev/null +++ b/persistence-modules/spring-data-mongodb/LIVE-TEST.md @@ -0,0 +1,9 @@ +========= + +## Spring Data MongoDB Live Testing + + +There are 3 scripts to simplify running live tests: +1. `live-test-setup.sh` builds a docker image with the necessary setup and runs it. The environment is ready, when the log stops - it takes approximately 30 seconds. +2. `live-test.sh` runs the live tests (but no other tests). +3. `live-test-setup.sh` stops and removes the docker image. diff --git a/persistence-modules/spring-data-mongodb/live-test-setup.sh b/persistence-modules/spring-data-mongodb/live-test-setup.sh new file mode 100644 index 0000000000..37e6c48dbd --- /dev/null +++ b/persistence-modules/spring-data-mongodb/live-test-setup.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +docker image build -t spring-data-mongodb:live-test live-test/ + +docker run -p 27017:27017 --name spring-data-mongodb-live-test spring-data-mongodb:live-test diff --git a/persistence-modules/spring-data-mongodb/live-test-teardown.sh b/persistence-modules/spring-data-mongodb/live-test-teardown.sh new file mode 100644 index 0000000000..a29163bc7a --- /dev/null +++ b/persistence-modules/spring-data-mongodb/live-test-teardown.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +docker stop spring-data-mongodb-live-test +docker rm spring-data-mongodb-live-test diff --git a/persistence-modules/spring-data-mongodb/live-test.sh b/persistence-modules/spring-data-mongodb/live-test.sh index bb513a90bb..5a079bdac8 100755 --- a/persistence-modules/spring-data-mongodb/live-test.sh +++ b/persistence-modules/spring-data-mongodb/live-test.sh @@ -1,11 +1,3 @@ #!/bin/bash -docker image build -t spring-data-mongodb:live-test live-test/ - -docker run -p 27017:27017 --name spring-data-mongodb-live-test -it spring-data-mongodb:live-test -#wait - mvn clean compile test -P live-all - -docker stop spring-data-mongodb-live-test -docker rm spring-data-mongodb-live-test