forked from cyberark/conjur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·51 lines (41 loc) · 1.04 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash -ex
function finish {
docker rm -f $pg_cid
docker rm -f $server_cid
}
trap finish EXIT
export CONJUR_DATA_KEY="$(docker run --rm conjur data-key generate)"
pg_cid=$(docker run -d postgres:9.3)
mkdir -p spec/reports
mkdir -p cucumber/api/features/reports
mkdir -p cucumber/policy/features/reports
server_cid=$(docker run -d \
--link $pg_cid:pg \
-e DATABASE_URL=postgres://postgres@pg/postgres \
-e RAILS_ENV=test \
conjur server)
cat << "TEST" | docker run \
-i \
--rm \
--link $pg_cid:pg \
--link $server_cid:conjur \
-v $PWD:/src/conjur \
-e DATABASE_URL=postgres://postgres@pg/postgres \
-e RAILS_ENV=test \
-e CONJUR_APPLIANCE_URL=http://conjur \
-e CONJUR_ADMIN_PASSWORD=admin \
--entrypoint bash \
conjur-test
#!/bin/bash -ex
for i in $(seq 10); do
curl -o /dev/null -fs -X OPTIONS http://conjur > /dev/null && break
echo -n "."
sleep 2
done
cd /src/conjur
rm -rf coverage
rm -rf spec/reports/*
rm -rf cucumber/api/features/reports/*
rm -rf cucumber/policy/features/reports/*
bundle exec rake jenkins || true
TEST