File: test_tablespaces_01.py

package info (click to toggle)
pg-auto-failover 2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,368 kB
  • sloc: ansic: 58,369; python: 5,515; sql: 3,177; makefile: 629; sh: 35
file content (23 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from nose.tools import *
from tests.tablespaces.tablespace_utils import node1


# Node 1 is spun up by Makefile, wait until it's up
def test_000_init_monitor_and_primary():
    # Wait a bit longer than normal for start up
    assert node1.wait_until_state(
        target_state="single", timeout=90, sleep_time=3
    )


def test_002_create_t1():
    node1.run_sql_query("CREATE TABLE t1(a int)")
    node1.run_sql_query("INSERT INTO t1 VALUES (1), (2)")


def test_003_create_tablespace():
    node1.run_sql_query(
        "CREATE TABLESPACE extended_a LOCATION '/extra_volumes/extended_a';"
    )
    node1.run_sql_query("CREATE TABLE t2(i int) TABLESPACE extended_a;")
    node1.run_sql_query("INSERT INTO t2 VALUES (3), (4);")