-
Notifications
You must be signed in to change notification settings - Fork 40
/
pr_check_docker.sh
29 lines (23 loc) · 976 Bytes
/
pr_check_docker.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
#!/bin/bash -ex
# reflects defaults found in pkg/config/db.go
export GORM_DIALECT="postgres"
export GORM_HOST="localhost"
export GORM_PORT="5432"
export GORM_NAME="managed-services-api"
export GORM_USERNAME="managed-services-api"
export GORM_PASSWORD="secret"
export GORM_SSLMODE="disable"
export GORM_DEBUG="false"
export LOGLEVEL="1"
export TEST_SUMMARY_FORMAT="standard-verbose"
# cd /kas-fleet-manager/src/github.com/bf2fc6cc711aee1a0c2a/kas-fleet-manager
# ls -la
# go version
# start postgres
which pg_ctl
PGDATA=/var/lib/postgresql/data /usr/lib/postgresql/*/bin/pg_ctl -w stop
PGDATA=/var/lib/postgresql/data /usr/lib/postgresql/*/bin/pg_ctl start -o "-c listen_addresses='*' -p 5432"
# check the code. Then run the unit and integration tests and cleanup cluster (if running against real OCM)
make -k lint verify test test/integration test/report-portal/push test/cluster/cleanup
# required for entrypoint script run by docker to exit and stop container
exit 0