Commit d2b22802 authored by zauberstuhl's avatar zauberstuhl

Merge branch 'refactor' into 'master'

Refactor testsuite code

See merge request !16
parents cfa553b4 eb507461
Pipeline #2347 passed with stage
in 41 seconds
......@@ -48,13 +48,13 @@ Say we have a project called `testproject` and it can communicate with other `te
If we have two servers running on `172.17.0.4:3000` and `172.17.0.5:3000` we can send `172.17.0.4`
a simple message by executing following command:
curl http://172.17.0.5:3000/add@172.17.0.4:3000
curl http://172.17.0.5:3000/send?http://172.17.0.4:3000/ping
If we ask the server directly whether it received a message or not:
curl http://172.17.0.4:3000
docker logs <container-172.17.0.4> 2>&1 | grep ping | wc -l
it should return one, otherwise it will return zero!
it should return the number of received pings!
**Getting started**
......@@ -75,9 +75,11 @@ Then you can install the testsuite dependencies:
* github.com/stedolan/jq
* github.com/sstephenson/bats
Simply run the install script or do it manually:
If you prefer running tests within docker you can also use the testsuite image:
bash scripts/install.sh
docker run --rm -ti \
-v /var/run/docker.sock:/var/run/docker.sock \
registry.git.feneas.org/feneas/federation/testsuite:latest bash
## Docker Image
......@@ -114,14 +116,12 @@ Following environment variables will be available while tests are running:
For our `testproject` that could look something like this:
```
FROM debian:jessie
FROM golang:1.12
RUN apt-get update
RUN apt-get install -y \
git-core postgresql-client netcat curl
RUN git clone https://git.feneas.org/feneas/federation/testsuite-testproject.git
WORKDIR testsuite-testproject
RUN git clone \
https://git.feneas.org/feneas/federation/testsuite-testproject.git \
/go/src/feneas/federation/testsuite-testproject
WORKDIR /go/src/feneas/federation/testsuite-testproject
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
......@@ -147,7 +147,12 @@ if [ "$PROJECT" == "testproject" ]; then
}
fi
./testproject.sh $DATABASE postgreshost $PORT
go build -o server main.go || {
echo "Cannot build sources"
exit 1
}
./server :$PORT
```
### Building
......@@ -156,7 +161,7 @@ fi
Last final step before we have a fully functional docker image is to build the actual image:
docker build --no-cache -t registry.git.feneas.org/feneas/federation/testsuite/testproject:v1.0.3-testproject .
docker build --no-cache -t registry.git.feneas.org/feneas/federation/testsuite/testproject:vX.X.X-testproject .
The testsuite requires a special naming for every image: `registry.git.feneas.org/feneas/federation/testsuite/<project>:<version>-<project>`
......@@ -166,7 +171,7 @@ and create a project tag and we are done with the image part:
cd <workspace>/testsuite/testproject
git add .
git commit -m "Add testproject docker image"
git tag v1.0.3-testproject
git tag vX.X.X-testproject
## Testing
......@@ -186,34 +191,23 @@ I suggest we start with loading the test helper first since it holds many helper
load test_helper
```
Since we need two instances of our `testproject` we have to create two postgresql databases first:
```
@test "$btf create databases" {
for tp in tp1 tp2; do
create_database $tp
[ "$?" -eq 0 ]
done
}
```
and start-up the mentioned servers:
Since we need two instances of our `testproject` we have to create them first:
```
@test "$btf start testproject#1 server" {
@test "$PREFIX start testproject#1 server" {
start_app tp1 3000 testproject$(latest_tag testproject)
[ "$?" -eq 0 ]
}
@test "$btf start testproject#2 server" {
start_app tp2 3000 testproject$(latest_tag testproject)
@test "$PREFIX start testproject#2 server" {
start_app tp2 3001 testproject$(latest_tag testproject)
[ "$?" -eq 0 ]
}
```
Now the interesting part starts.. We want to test a request to tp2!
If we execute the curl command (mentioned at the beginning of this
document) tp2 should federated/relay the message to tp1.
document) tp2 should federate/relay the message to tp1.
To prove this we send two requests:
......@@ -221,24 +215,38 @@ To prove this we send two requests:
2. to tp1 ensuring the message was received
```
@test "$btf increase count on tp1 via tp2" {
get "http://$(container_ip tp2):3000/add@$(container_ip tp1):3000"
@test "$PREFIX ping both servers, should reply with pong" {
get "http://$(container_ip tp1):3000/ping"
echo "expected 200, got $HTTP_STATUS_CODE"
[ "$HTTP_STATUS_CODE" == "200" ]
echo "expected pong, got $HTTP_BODY"
[ "$HTTP_BODY" == "pong" ]
get "http://$(container_ip tp2):3001/ping"
echo "expected 200, got $HTTP_STATUS_CODE"
[ "$HTTP_STATUS_CODE" == "200" ]
echo "expected pong, got $HTTP_BODY"
[ "$HTTP_BODY" == "pong" ]
}
@test "$btf test count on tp1, it should be one" {
get "http://$(container_ip tp1):3000"
@test "$PREFIX ping testproject#1 via testproject#2 server" {
get "http://$(container_ip tp2):3001/send?http://$(container_ip tp1):3000/ping"
echo "expected 200, got $HTTP_STATUS_CODE"
[ "$HTTP_STATUS_CODE" == "200" ]
echo "expected 1, got $HTTP_BODY"
[ "$HTTP_BODY" == "1" ]
echo "expected ok, got $HTTP_BODY"
[ "$HTTP_BODY" == "ok" ]
# ping count should be two by now
count=$(docker logs $(container_id tp1) 2>&1 | grep ping | wc -l)
echo "expected 2, got $count"
[ "$count" -eq "2" ]
}
```
Last but not least we do some cleaning and we are done with our first unit test for the federated web `\m/`
```
@test "$btf stop and delete the containers" {
@test "$PREFIX stop and delete the containers" {
for tp in tp1 tp2; do
stop_app $tp
[ "$?" -eq 0 ]
......@@ -246,16 +254,9 @@ Last but not least we do some cleaning and we are done with our first unit test
[ "$?" -eq 0 ]
done
}
@test "$btf drop databases" {
for tp in tp1 tp2; do
drop_database $tp
[ "$?" -eq 0 ]
done
}
```
{% include info.html text="You will find the full version of testproject.bats [here](https://git.feneas.org/feneas/federation/testsuite/raw/master/testproject.bats)!" %}
{% include info.html text="You will find the full version of testproject.bats [here](https://git.feneas.org/feneas/federation/testsuite/raw/master/tests/testproject.bats)!" %}
That should be it! You can add and commit your changes and request a MR upstream:
......
......@@ -24,7 +24,7 @@ function ganggo_fetch_token() {
echo "body = $HTTP_BODY"
echo "token = $token"
[ "$token" != "null" ]
echo "-H access_token:$token" > $curl_params
echo "-H access_token:$token" > $CURL_PARAMS
}
# ganggo_start_sharing "g2@localhost:9001" "http://localhost:9000"
......
......@@ -27,7 +27,7 @@ function socialhome_fetch_token() {
echo "body = $HTTP_BODY"
echo "token = $token"
[ "$token" != "null" ]
echo "-H 'Authorization: Token $token'" > $curl_params
echo "-H 'Authorization: Token $token'" > $CURL_PARAMS
}
# socialhome_start_sharing "g1@localhost:9000" "http://localhost:9001"
......
FROM debian:jessie
FROM golang:1.12
RUN apt-get update
RUN apt-get install -y \
git-core postgresql-client nmap curl inotify-tools
RUN git clone https://git.feneas.org/feneas/federation/testsuite-testproject.git
WORKDIR testsuite-testproject
RUN git clone \
https://git.feneas.org/feneas/federation/testsuite-testproject.git \
/go/src/feneas/federation/testsuite-testproject
WORKDIR /go/src/feneas/federation/testsuite-testproject
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
......
......@@ -11,4 +11,9 @@ if [ "$PROJECT" == "testproject" ]; then
}
fi
./testproject.sh $DATABASE postgreshost $PORT
go build -o server main.go || {
echo "Cannot build sources"
exit 1
}
./server :$PORT
export btf=$(basename $BATS_TEST_FILENAME)
export curl_params="/tmp/.bats-curl_params"
export test_id="/tmp/.bats-test_id"
export PREFIX=$(basename $BATS_TEST_FILENAME)
export CURL_PARAMS="$BATS_TMPDIR/curl-params"
export TEST_ID="$BATS_TMPDIR/test-id$CI_JOB_ID"
export CI_REGISTRY_IMAGE="registry.git.feneas.org/feneas/federation/testsuite"
unset HTTP_STATUS_CODE
......@@ -38,7 +38,7 @@ function fetch() {
unset params
unset field_params
[ -f "$curl_params" ] && params=$(cat $curl_params)
[ -f "$CURL_PARAMS" ] && params=$(cat $CURL_PARAMS)
if [[ "$3" == "url" ]]; then field_params="-d '$2'"
else
IFS='&' read -ra reqparams <<< "$2"
......@@ -97,16 +97,22 @@ function stop_app() {
# remove_app "g1"
function remove_app() {
# print the entire container log before
# deleting for debugging purposes
echo -e "#\n#\n# CONTAINER LOG $(container_id "$1")\n#\n#" >&3
docker logs "$(container_id "$1")" 2>&1 \
| while read line; do echo "# $line" >&3; done
# delete the container
docker rm "$(container_id "$1")"
}
# container_id "g1"
function container_id() {
# set a gloabl test ID for multiple project testing
if [ ! -f "$test_id" ]; then
shuf -i 10000-90000 -n 1 > $test_id
if [ ! -f "$TEST_ID" ]; then
shuf -i 10000-90000 -n 1 > $TEST_ID
fi
echo "$(cat $test_id)-$1"
echo "$(cat $TEST_ID)-$1"
}
# container_ip "g1"
......
......@@ -3,16 +3,16 @@
load '../test_helper'
load '../projects/ganggo/ganggo_helper'
@test "$btf create database" {
@test "$PREFIX create database" {
create_database "g1"
[ "$?" -eq 0 ]
}
@test "$btf start ganggo#1 server" {
@test "$PREFIX start ganggo#1 server" {
ganggo_start_server g1 "9000"
}
@test "$btf start diaspora#1 server" {
@test "$PREFIX start diaspora#1 server" {
start_app "d1" "3000" "diaspora"$(latest_tag "diaspora")
[ "$?" -eq 0 ]
code=$(wait_for "docker logs $(container_id "d1")" "Starting Diaspora in production")
......@@ -22,17 +22,17 @@ load '../projects/ganggo/ganggo_helper'
sleep 15
}
@test "$btf create ganggo user" {
@test "$PREFIX create ganggo user" {
ganggo_create_user g1 "http://$(container_ip "g1"):9000"
}
@test "$btf create diaspora user" {
@test "$PREFIX create diaspora user" {
rails_runner d1 "User.build(
username: 'd1', email: 'd1@d1.de', password: 'pppppp').save!"
[ "$?" -eq 0 ]
}
@test "$btf setup user relations" {
@test "$PREFIX setup user relations" {
rails_runner "d1" "user = User.find_by(username: 'd1')
person = Person.find_or_fetch_by_identifier('g1@$(container_ip "g1"):9000')
aspect = Aspect.new(name: 'test', user_id: user.id)
......@@ -101,15 +101,15 @@ function send_type() {
[ "$code" -eq "0" ]
}
@test "$btf create public entities and check federation" {
@test "$PREFIX create public entities and check federation" {
send_type public
}
@test "$btf create private entities and check federation" {
@test "$PREFIX create private entities and check federation" {
send_type private
}
@test "$btf stop and delete containers" {
@test "$PREFIX stop and delete containers" {
for app in g1 d1; do
stop_app $app
[ "$?" -eq 0 ]
......@@ -118,7 +118,7 @@ function send_type() {
done
}
@test "$btf drop databases" {
@test "$PREFIX drop databases" {
drop_database "g1"
[ "$?" -eq 0 ]
drop_database "d1"
......
......@@ -6,16 +6,16 @@
load '../test_helper'
load '../projects/ganggo/ganggo_helper'
@test "$btf create database" {
@test "$PREFIX create database" {
create_database "g1"
[ "$?" -eq 0 ]
}
@test "$btf start ganggo#1 server" {
@test "$PREFIX start ganggo#1 server" {
ganggo_start_server g1 "9000"
}
@test "$btf start diaspora#1 server" {
@test "$PREFIX start diaspora#1 server" {
start_app "d1" "3000" "diaspora"$(latest_tag "diaspora")
[ "$?" -eq 0 ]
code=$(wait_for "docker logs $(container_id "d1")" "Starting Diaspora in production")
......@@ -25,21 +25,21 @@ load '../projects/ganggo/ganggo_helper'
sleep 15
}
@test "$btf create user" {
@test "$PREFIX create user" {
ganggo_create_user g1 "http://$(container_ip "g1"):9000"
}
@test "$btf create diaspora user" {
@test "$PREFIX create diaspora user" {
rails_runner d1 "User.build(
username: 'd1', email: 'd1@d1.de', password: 'pppppp').save!"
[ "$?" -eq 0 ]
}
@test "$btf fetch user token" {
@test "$PREFIX fetch user token" {
ganggo_fetch_token g1 "http://$(container_ip "g1"):9000"
}
@test "$btf setup user relations" {
@test "$PREFIX setup user relations" {
ganggo_start_sharing \
"d1@$(container_ip "d1"):3000" "http://$(container_ip "g1"):9000"
}
......@@ -109,15 +109,15 @@ function send_type() {
#[ "$code" -eq "0" ]
}
@test "$btf create public entities and check federation" {
@test "$PREFIX create public entities and check federation" {
send_type public
}
@test "$btf create private entities and check federation" {
@test "$PREFIX create private entities and check federation" {
send_type private
}
@test "$btf stop and delete containers" {
@test "$PREFIX stop and delete containers" {
for app in g1 d1; do
stop_app $app
[ "$?" -eq 0 ]
......@@ -126,7 +126,7 @@ function send_type() {
done
}
@test "$btf drop databases" {
@test "$PREFIX drop databases" {
drop_database "g1"
[ "$?" -eq 0 ]
drop_database "d1"
......
......@@ -6,34 +6,34 @@
load '../test_helper'
load '../projects/ganggo/ganggo_helper'
@test "$btf create databases" {
@test "$PREFIX create databases" {
create_database "g1"
[ "$?" -eq 0 ]
create_database "g2"
[ "$?" -eq 0 ]
}
@test "$btf start ganggo#1 server" {
@test "$PREFIX start ganggo#1 server" {
ganggo_start_server g1 "9000"
}
@test "$btf start ganggo#2 server" {
@test "$PREFIX start ganggo#2 server" {
ganggo_start_server g2 "9001"
}
@test "$btf create user#1" {
@test "$PREFIX create user#1" {
ganggo_create_user g1 "http://$(container_ip "g1"):9000"
}
@test "$btf create user#2" {
@test "$PREFIX create user#2" {
ganggo_create_user g2 "http://$(container_ip "g2"):9001"
}
@test "$btf fetch user#1 token" {
@test "$PREFIX fetch user#1 token" {
ganggo_fetch_token g1 "http://$(container_ip "g1"):9000"
}
@test "$btf setup user relations" {
@test "$PREFIX setup user relations" {
ganggo_start_sharing \
"g2@$(container_ip "g2"):9001" "http://$(container_ip "g1"):9000"
}
......@@ -104,15 +104,15 @@ function send_type() {
#[ "$code" -eq "0" ]
}
@test "$btf create public entities and check federation" {
@test "$PREFIX create public entities and check federation" {
send_type public
}
@test "$btf create private entities and check federation" {
@test "$PREFIX create private entities and check federation" {
send_type private
}
@test "$btf stop and delete containers" {
@test "$PREFIX stop and delete containers" {
for app in g1 g2; do
stop_app $app
[ "$?" -eq 0 ]
......@@ -121,7 +121,7 @@ function send_type() {
done
}
@test "$btf drop databases" {
@test "$PREFIX drop databases" {
drop_database "g1"
[ "$?" -eq 0 ]
drop_database "g2"
......
......@@ -2,7 +2,7 @@
load '../test_helper'
@test "$btf start mastodon#1 server" {
@test "$PREFIX start mastodon#1 server" {
start_app "m1" "3000" "mastodon"$(latest_tag "mastodon")
[ "$?" -eq 0 ]
code=$(wait_for_mastodon "m1")
......@@ -10,7 +10,7 @@ load '../test_helper'
[ "$code" -eq "0" ]
}
@test "$btf start mastodon#2 server" {
@test "$PREFIX start mastodon#2 server" {
start_app "m2" "3001" "mastodon"$(latest_tag "mastodon")
[ "$?" -eq 0 ]
code=$(wait_for_mastodon "m2")
......@@ -19,7 +19,7 @@ load '../test_helper'
}
# see https://github.com/tootsuite/documentation/blob/master/Using-the-API/Testing-with-cURL.md
@test "$btf create oauth application" {
@test "$PREFIX create oauth application" {
post
"client_name=bats&redirect_uris=urn:ietf:wg:oauth:2.0:oob&scopes=read%20write%20follow" \
"http://$(container_ip "m1"):3000/api/v1/apps"
......@@ -37,10 +37,10 @@ load '../test_helper'
token=$(json_value "access_token")
echo "token = $token"
[ "$token" != "" ]
echo "-H 'Authorization: Bearer $token'" > $curl_params
echo "-H 'Authorization: Bearer $token'" > $CURL_PARAMS
}
@test "$btf follow admin@m2:3001" {
@test "$PREFIX follow admin@m2:3001" {
post "uri=admin@$(container_ip "m2"):3001" \
"http://$(container_ip "m1"):3000/api/v1/follows"
post "uri=admin@$(container_ip "m2"):3001" \
......@@ -52,7 +52,7 @@ load '../test_helper'
[ "$username" == "admin" ]
}
@test "$btf search for admin@m2:3001" {
@test "$PREFIX search for admin@m2:3001" {
get "http://$(container_ip "m1"):3000/api/v1/search?q=admin@$(container_ip "m2"):3001"
echo "HTTP_STATUS_CODE = $HTTP_STATUS_CODE"
[ "$HTTP_STATUS_CODE" == "200" ]
......@@ -62,13 +62,13 @@ load '../test_helper'
[ "$acct" == "admin@$(container_ip "m2"):3001" ]
}
@test "$btf clean-up containers, databases and temp files" {
@test "$PREFIX clean-up containers, databases and temp files" {
stop_app "m1 m2"
[ "$?" -eq 0 ]
remove_app "m1 m2"
[ "$?" -eq 0 ]
drop_database "m1"
[ "$?" -eq 0 ]
rm -v $curl_params
rm -v $CURL_PARAMS
[ "$?" -eq 0 ]
}
......@@ -7,57 +7,57 @@ load '../test_helper'
load '../projects/ganggo/ganggo_helper'
load '../projects/socialhome/socialhome_helper'
@test "$btf create databases" {
@test "$PREFIX create databases" {
create_database "g1"
[ "$?" -eq 0 ]
create_database "s1"
[ "$?" -eq 0 ]
}
@test "$btf start ganggo#1 server" {
@test "$PREFIX start ganggo#1 server" {
ganggo_start_server g1 "9000"
}
@test "$btf start socialhome#1 server" {
@test "$PREFIX start socialhome#1 server" {
socialhome_start_server s1 "9001"
}
@test "$btf create ganggo#1 user" {
@test "$PREFIX create ganggo#1 user" {
ganggo_create_user g1 "http://$(container_ip "g1"):9000"
}
@test "$btf create socialhome#1 user" {
@test "$PREFIX create socialhome#1 user" {
socialhome_create_user s1
}
# since socialhome only delivers to subscriped servers
# the ganggo user has to follow the socialhome user
@test "$btf fetch ganggo#1 token" {
@test "$PREFIX fetch ganggo#1 token" {
ganggo_fetch_token g1 "http://$(container_ip "g1"):9000"
}
@test "$btf setup user relations" {
@test "$PREFIX setup user relations" {
ganggo_start_sharing \
"s1@$(container_ip "s1"):9001" "http://$(container_ip "g1"):9000"
}
# otherwise the socialhome token request will fail
@test "$btf clean-up ganggo#1 files" {
rm -v $curl_params
@test "$PREFIX clean-up ganggo#1 files" {
rm -v $CURL_PARAMS
[ "$?" -eq 0 ]
}
# according to http://socialhome.readthedocs.io/en/latest/api.html#authenticating
@test "$btf fetch socialhome#1 token" {
@test "$PREFIX fetch socialhome#1 token" {
socialhome_fetch_token s1 "http://$(container_ip "s1"):9001"
}
@test "$btf start sharing" {
@test "$PREFIX start sharing" {
socialhome_start_sharing \
"g1@$(container_ip "g1"):9000" "http://$(container_ip "s1"):9001"
}
@test "$btf create public entities and check federation" {
@test "$PREFIX create public entities and check federation" {
post "text=foobar&visibility=public" \
"http://$(container_ip "s1"):9001/api/content/"
[ "$?" -eq 0 ]
......@@ -74,7 +74,7 @@ load '../projects/socialhome/socialhome_helper'
[ "$code" -eq "0" ]
}
@test "$btf clean-up files, containers and database" {
@test "$PREFIX clean-up files, containers and database" {
for app in g1 s1; do
stop_app $app
[ "$?" -eq 0 ]
......@@ -83,6 +83,6 @@ load '../projects/socialhome/socialhome_helper'
drop_database $app
[ "$?" -eq 0 ]
done
rm -v $curl_params
rm -v $CURL_PARAMS
[ "$?" -eq 0 ]
}
......@@ -4,14 +4,7 @@
load '../test_helper'
@test "$btf create databases" {
for tp in tp1 tp2; do
create_database $tp
[ "$?" -eq 0 ]
done
}
@test "$btf start testproject#1 server" {
@test "$PREFIX start testproject#1 server" {
start_app tp1 3000 testproject$(latest_tag testproject)
[ "$?" -eq 0 ]
# NOTE You can also wait for certain log output!
......@@ -24,48 +17,48 @@ load '../test_helper'
# for this project that could look something like this:
#
cmd="docker logs $(container_id tp1)"
text="CREATE TABLE"
text="Listening on :3000"
code=$(wait_for "$cmd" "$text")
[ "$code" -eq "0" ]
}
@test "$btf start testproject#2 server" {
start_app tp2 3000 testproject$(latest_tag testproject)
@test "$PREFIX start testproject#2 server" {
start_app tp2 3001 testproject$(latest_tag testproject)
[ "$?" -eq 0 ]
cmd="docker logs $(container_id tp2)"
text="CREATE TABLE"
text="Listening on :3001"
code=$(wait_for "$cmd" "$text")
[ "$code" -eq "0" ]
}
@test "$btf test initial count, it should be zero" {
for tp in tp1 tp2; do
get "http://$(container_ip $tp):3000"
echo "expected 200, got $HTTP_STATUS_CODE"
[ "$HTTP_STATUS_CODE" == "200" ]
echo "expected 0, got $HTTP_BODY"
[ "$HTTP_BODY" == "0" ]
done
}
@test "$PREFIX ping both servers, should reply with pong" {
get "http://$(container_ip tp1):3000/ping"
echo "expected 200, got $HTTP_STATUS_CODE"
[ "$HTTP_STATUS_CODE" == "200" ]
echo "expected pong, got $HTTP_BODY"
[ "$HTTP_BODY" == "pong" ]
@test "$btf increase count on tp1 via tp2" {
get "http://$(container_ip tp2):3000/add@$(container_ip tp1):3000"
get "http://$(container_ip tp2):3001/ping"
echo "expected 200, got $HTTP_STATUS_CODE"
[ "$HTTP_STATUS_CODE" == "200" ]
echo "expected pong, got $HTTP_BODY"
[ "$HTTP_BODY" == "pong" ]
}
@test "$btf test count on tp1, it should be one" {
cmd='get "http://'$(container_ip tp1)':3000"'
code=$(wait_for "$cmd" "1")
[ "$code" -eq "0" ]
}
@test "$PREFIX ping testproject#1 via testproject#2 server" {
get "http://$(container_ip tp2):3001/send?http://$(container_ip tp1):3000/ping"
echo "expected 200, got $HTTP_STATUS_CODE"
[ "$HTTP_STATUS_CODE" == "200" ]
echo "expected ok, got $HTTP_BODY"
[ "$HTTP_BODY" == "ok" ]
@test "$btf check the database on tp1 too" {
cmd='query tp1 "select count(*) from testtable;"'
code=$(wait_for "$cmd" "1")
[ "$code" -eq "0" ]
# ping count should be two by now
count=$(docker logs $(container_id tp1) 2>&1 | grep ping | wc -l)
echo "expected 2, got $count"
[ "$count" -eq "2" ]
}
@test "$btf stop and delete the containers" {
@test "$PREFIX stop and delete the containers" {
for tp in tp1 tp2; do
stop_app $tp
[ "$?" -eq 0 ]
......@@ -73,10 +66,3 @@ load '../test_helper'
[ "$?" -eq 0 ]
done
}
@test "$btf drop databases" {
for tp in tp1 tp2; do
drop_database $tp
[ "$?" -eq 0 ]
done
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment