Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-11-24 11:36:41 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-11-25 13:49:19 +0300
commite421429020dac368e6820f680bd8ebea89aebf26 (patch)
tree6268e155252739e881d5d591ca84f68d4a0f9175 /.gitlab-ci.yml
parent03a621127eb8b151d206a2007a68f4f2b36f6dd7 (diff)
ci: Use postgres_definition in Praefect smoke test job
The Praefect smoke test job sets up the Postgres service on its own, even though we have the `postgres_definition` which would already go most of the way of setting it up correctly. Convert the test to use the shared Postgres service definition instead to avoid code duplication. The only thing that needs to change for the definition is that we didn't have a database name defined at all, which is added as part of this commit.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml12
1 files changed, 3 insertions, 9 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 26831cbd4..669ad8654 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -53,8 +53,9 @@ include:
- postgres:${POSTGRES_VERSION}
variables: &postgres_variables
PGHOST: postgres
- PGPORT: "5432"
+ PGPORT: 5432
PGUSER: postgres
+ POSTGRES_DB: praefect_test
POSTGRES_HOST_AUTH_METHOD: trust
before_script:
- go version
@@ -206,16 +207,9 @@ test:nightly:
test:praefect_smoke:
<<: *test_definition
- services:
- - postgres:${POSTGRES_VERSION}
- variables:
- POSTGRES_DB: praefect_test
- POSTGRES_USER: praefect
- POSTGRES_PASSWORD: sql-password
+ <<: *postgres_definition
script:
- make
- # Sanity check: direct ping with psql
- - PGPASSWORD=$POSTGRES_PASSWORD psql -h postgres -U $POSTGRES_USER -d $POSTGRES_DB -c 'select now()'
- ruby -rerb -e 'ERB.new(ARGF.read).run' _support/config.praefect.toml.ci-sql-test.erb > config.praefect.toml
- ./_build/bin/praefect -config config.praefect.toml sql-ping
- ./_build/bin/praefect -config config.praefect.toml sql-migrate