Skip to content

Commit 48b7d5c

Browse files
committed
Cleanup tablespace test
1 parent d23d0f1 commit 48b7d5c

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

tests/test-output-flex-tablespace.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,27 @@
55

66
static testing::db::import_t db;
77

8-
static void require_tables(pg::conn_t const &conn)
9-
{
10-
conn.require_has_table("osm2pgsql_test_point");
11-
conn.require_has_table("osm2pgsql_test_line");
12-
conn.require_has_table("osm2pgsql_test_polygon");
13-
}
8+
static char const *const conf_file = "test_output_flex.lua";
149

15-
TEST_CASE("simple import with tables spaces")
10+
TEST_CASE("simple import with tablespaces for middle")
1611
{
1712
{
1813
auto conn = db.db().connect();
1914
REQUIRE(1 ==
2015
conn.get_count("pg_tablespace", "spcname = 'tablespacetest'"));
2116
}
2217

23-
options_t options = testing::opt_t().slim().flex("test_output_flex.lua");
18+
options_t options = testing::opt_t().slim().flex(conf_file);
2419
options.tblsslim_index = "tablespacetest";
2520
options.tblsslim_data = "tablespacetest";
2621

2722
REQUIRE_NOTHROW(db.run_file(options, "liechtenstein-2013-08-03.osm.pbf"));
2823

2924
auto conn = db.db().connect();
30-
require_tables(conn);
25+
26+
conn.require_has_table("osm2pgsql_test_point");
27+
conn.require_has_table("osm2pgsql_test_line");
28+
conn.require_has_table("osm2pgsql_test_polygon");
3129

3230
REQUIRE(1362 == conn.get_count("osm2pgsql_test_point"));
3331
REQUIRE(2932 == conn.get_count("osm2pgsql_test_line"));

0 commit comments

Comments
 (0)