1
0
mirror of https://github.com/xorcare/testing-go-code-with-postgres.git synced 2024-12-27 16:33:05 +02:00
Commit Graph

5 Commits

Author SHA1 Message Date
Vasiliy Vasilyuk
b98187650e
Make human-readable database name
Sometimes tests terminate fatally and databases are not deleted and you
want to understand which test left garbage behind. It is also in the
future it will be possible to add the ability not to delete databases
for tests that ended with an error, and it will be necessary to
understand from which test the database.

Therefore, the generation of the database name from the name of the
test with the addition of a unique identifier so that the names do not
overlap.

    Reports the maximum identifier length. It is determined as one less
    than the value of NAMEDATALEN when building the server. The default
    value of NAMEDATALEN is 64; therefore the default
    max_identifier_length is 63 bytes, which can be less than 63
    characters when using multibyte encodings.

See https://www.postgresql.org/docs/15/runtime-config-preset.html

    PostgreSQL allows you to create any number of databases at a given
    site. Database names must have an alphabetic first character and
    are limited to 63 bytes in length. A convenient choice is to create
    a database with the same name as your current user name. Many tools
    assume that database name as the default, so it can save you some
    typing. To create that database, simply type:

See https://www.postgresql.org/docs/15/tutorial-createdb.html
2023-07-16 17:18:30 +03:00
Vasiliy Vasilyuk
c2e0810c2c
Update README.md 2023-07-11 23:15:26 +03:00
Vasiliy Vasilyuk
42815eab15
Add GitLab CI and mirroring to GitLab
Added an example .gitlab-ci.yml, to make a sample more informative.

Also added mirroring to gitlab to simplify repository development and
gitlab ci validation.
2023-07-11 22:53:23 +03:00
Vasiliy Vasilyuk
5fc60fb2f5
Add coverage report by Codecov
This is needed to display coverage, and as an example of setting up
coverage counts.

Also, added badges to make the repositories look prettier.
2023-07-10 23:36:05 +03:00
Vasiliy Vasilyuk
b346272f7f
Publish an example testing go code with Postgres 2023-07-05 01:31:59 +03:00