Skip to content

Commit acc8edc

Browse files
avanessIvan Lazarev
andauthored
minor hotfix for OptionTest.test_help_6, OptionTest.test_version_2 and tests/Readme.md FAQ (#494)
Co-authored-by: Ivan Lazarev <i.lazarev@postgrespro.ru>
1 parent e72feb6 commit acc8edc

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

tests/Readme.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[see wiki](https://confluence.postgrespro.ru/display/DEV/pg_probackup)
1+
****[see wiki](https://confluence.postgrespro.ru/display/DEV/pg_probackup)
22

33
```
44
Note: For now these tests work on Linux and "kinda" work on Windows
@@ -50,3 +50,32 @@ Usage:
5050
export PG_CONFIG=/path/to/pg_config
5151
python -m unittest [-v] tests[.specific_module][.class.test]
5252
```
53+
54+
### Troubleshooting FAQ
55+
56+
#### python test failures
57+
1. Test failure reason like
58+
```
59+
testgres.exceptions.QueryException ERROR: could not open extension control file "/home/avaness/postgres/postgres.build/share/extension/amcheck.control": No such file or directory
60+
```
61+
62+
*Solution*: you have no `<postgres_src_root>/contrib/` extensions installed
63+
64+
```commandline
65+
cd <postgres_src_root>
66+
make world install
67+
```
68+
69+
2. Test failure
70+
71+
```
72+
FAIL: test_help_6 (tests.option.OptionTest)
73+
```
74+
75+
*Solution*: you didn't configure postgres build with `--enable-nls`
76+
77+
```commandline
78+
cd <postgres_src_root>
79+
make distclean
80+
<your-./configure-cmdline> --enable-nls
81+
```

tests/expected/option_help_ru.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ pg_probackup - утилита для управления резервным к
178178
[--remote-proto] [--remote-host]
179179
[--remote-port] [--remote-path] [--remote-user]
180180
[--ssh-options]
181+
[--dry-run]
181182
[--help]
182183

183184
Подробнее читайте на сайте <https://github.com/postgrespro/pg_probackup>.

tests/option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_version_2(self):
2424
"""help options"""
2525
with open(os.path.join(self.dir_path, "expected/option_version.out"), "rb") as version_out:
2626
self.assertIn(
27-
version_out.read().decode("utf-8"),
27+
version_out.read().decode("utf-8").strip(),
2828
self.run_pb(["--version"])
2929
)
3030

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy