Skip to content

Commit bb05f9d

Browse files
committed
enable FDW tests by default
1 parent 3de19ca commit bb05f9d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

tests/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ environment variable:
2626
export PG_CONFIG=/path/to/pg_config
2727
```
2828

29-
Tests concerning FDW features are disabled by default. To test FDW features
30-
you need to install postgres_fdw contrib module first and then set the TEST_FDW
31-
environment variable:
29+
To test FDW features you need to install postgres_fdw contrib module first.
30+
If you want to skip FDW tests set the FDW_DISABLED environment variable:
3231

3332
```
34-
export TEST_FDW=1
33+
export FDW_DISABLED=1
3534
```

tests/partitioning_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
import os
1313

1414

15-
def test_fdw(func):
15+
def if_fdw_enabled(func):
1616
"""To run tests with FDW support set environment variable TEST_FDW=1"""
1717
def wrapper(*args, **kwargs):
18-
if os.environ.get('TEST_FDW'):
18+
if os.environ.get('FDW_DISABLED') != '1':
1919
func(*args, **kwargs)
2020
else:
2121
print('Warning: FDW features tests are disabled, skipping...')
@@ -341,7 +341,7 @@ def check_tablespace(node, tablename, tablespace):
341341
self.assertTrue(check_tablespace(node, 'abc_prepended_2', 'pg_default'))
342342
self.assertTrue(check_tablespace(node, 'abc_added_2', 'pg_default'))
343343

344-
@test_fdw
344+
@if_fdw_enabled
345345
def test_foreign_table(self):
346346
"""Test foreign tables"""
347347

0 commit comments

Comments
 (0)