diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-11-24 11:36:41 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-11-25 13:49:19 +0300 |
commit | e421429020dac368e6820f680bd8ebea89aebf26 (patch) | |
tree | 6268e155252739e881d5d591ca84f68d4a0f9175 /_support | |
parent | 03a621127eb8b151d206a2007a68f4f2b36f6dd7 (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 '_support')
-rwxr-xr-x | _support/config.praefect.toml.ci-sql-test.erb | 60 |
1 files changed, 9 insertions, 51 deletions
diff --git a/_support/config.praefect.toml.ci-sql-test.erb b/_support/config.praefect.toml.ci-sql-test.erb index 91012ad7c..fdd1081c1 100755 --- a/_support/config.praefect.toml.ci-sql-test.erb +++ b/_support/config.praefect.toml.ci-sql-test.erb @@ -1,58 +1,16 @@ -# Example Praefect configuration file - -# # TCP address to listen on listen_addr = "127.0.0.1:2305" -# # Praefect can listen on a socket when placed on the same machine as all clients -# socket_path = "/home/git/gitlab/tmp/sockets/private/praefect.socket" -# # Optional: export metrics via Prometheus -# prometheus_listen_addr = "127.0.01:10101" -# # You can optionally configure Praefect to output JSON-formatted log messages to stdout -# [logging] -# format = "json" -# # Optional: Set log level to only log entries with that severity or above -# # One of, in order: debug, info, warn, errror, fatal, panic -# # Defaults to "info" -# level = "warn" -# [sentry] -# sentry_environment = "" -# sentry_dsn = "" -# -# Optional: authenticate Gitaly requests using a shared secret. This token works the same way as a gitaly token -# [auth] -# token = 'abc123secret' -# -# # One or more Gitaly servers need to be configured to be managed. The names -# of each server are used to link multiple nodes, or `gitaly_server`s together -# as shard. listen_addr should be unique for all nodes. -# Requires the protocol to be defined, e.g. tcp://host.tld:1234 - [[virtual_storage]] -name = "praefect" - -[[virtual_storage.node]] - storage = "praefect-git-0" - address = "tcp://praefect-git-0.internal" - token = 'token1' + name = "dummy" [[virtual_storage.node]] - storage = "praefect-git-1" - address = "tcp://praefect-git-1.internal" - token = 'token2' - -[[virtual_storage.node]] - storage = "praefect-git-2" - address = "tcp://praefect-git-2.internal" - token = 'token3' + storage = "dummy" + address = "tcp://dummy" + token = "dummy" [database] -# In CI this magical hostname 'postgres' points to our dedicated CI postgres instance. -host = 'postgres' - -# POSTGRES_* variables are defined in gitlab-ci.yml -dbname = '<%= ENV['POSTGRES_DB'] %>' -user = '<%= ENV['POSTGRES_USER'] %>' -password = '<%= ENV['POSTGRES_PASSWORD'] %>' - -# No SSL in CI -sslmode = 'disable' + # The following variables are defined in .gitlab-ci.yml. + host = '<%= ENV['PGHOST'] %>' + dbname = '<%= ENV['POSTGRES_DB'] %>' + user = '<%= ENV['PGUSER'] %>' + sslmode = 'disable' |