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
path: root/doc
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2021-08-05 13:10:11 +0300
committerPavlo Strokov <pstrokov@gitlab.com>2021-08-10 10:29:11 +0300
commit57d9b45c1017c000031405bec08ca10b5a20d34b (patch)
treea88b95b2ebb482e89bef4a7cd9faa2d4c799f9be /doc
parent4864db9de899b3929408c781c4b5b7437eb574b6 (diff)
documentation: Update requirements to run the tests
Because Postgres database is required for tests to pass we explicitly says about it in the documentation and provide a simple instruction on how to get one. The change also updates documentation of the glsql package to align it with the new approach. The old info that is not actual anymore is removed.
Diffstat (limited to 'doc')
-rw-r--r--doc/beginners_guide.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/beginners_guide.md b/doc/beginners_guide.md
index 2a482f3cb..d5ef0ef0a 100644
--- a/doc/beginners_guide.md
+++ b/doc/beginners_guide.md
@@ -181,6 +181,16 @@ Generally, you should always write new tests in Go even when testing Ruby code,
since we're planning to gradually rewrite everything in Go and want to avoid
having to rewrite the tests as well.
+Because praefect lives in the same repository we need to provide database connection
+information in order to run tests for it successfully. To get more info check out
+[glsql](../internal/praefect/datastore/glsql/doc.go) package documentation.
+The easiest way to set up a Postgres database instance is to run it as a Docker container.
+You can do it using command:
+```bash
+docker rm -f $(docker ps -q --all -f name=praefect-pg) > /dev/null 2>1; \
+docker run --name praefect-pg -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:12.6
+```
+
To run the full test suite, use `make test`.
You'll need some [test repositories](test_repos.md), you can set these up with `make prepare-tests`.