Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit c8fb92f

Browse files
committed
add citus smoke tests
1 parent 9a89028 commit c8fb92f

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

tests/prime.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ CREATE EXTENSION IF NOT EXISTS wrappers;
1818
CREATE EXTENSION IF NOT EXISTS http;
1919
CREATE EXTENSION IF NOT EXISTS pg_graphql;
2020
CREATE EXTENSION IF NOT EXISTS pg_jsonschema;
21+
22+
CREATE EXTENSION IF NOT EXISTS citus;

tests/smoke/0004-citus.sql

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
BEGIN;
2+
3+
select plan(3);
4+
5+
SELECT lives_ok($$
6+
CREATE TABLE events (
7+
device_id bigint,
8+
event_id bigserial,
9+
event_time timestamptz default now(),
10+
data jsonb not null,
11+
PRIMARY KEY (device_id, event_id)
12+
);
13+
$$);
14+
15+
-- citus distributed test
16+
SELECT lives_ok($$
17+
SELECT create_distributed_table('events', 'device_id');
18+
$$);
19+
20+
-- citus columnar test
21+
SELECT lives_ok($$
22+
CREATE TABLE events_columnar (
23+
device_id bigint,
24+
event_id bigserial,
25+
event_time timestamptz default now(),
26+
data jsonb not null
27+
)
28+
USING columnar;
29+
$$);
30+
31+
SELECT * FROM finish();
32+
ROLLBACK;

0 commit comments

Comments
 (0)