feat: add initial migration hook
This commit is contained in:
1 parent
79866a287f
commit
27e9f775be
174 files changed
+4234
-2180
No files matched your search
@@ -6,35 +6,35 @@ begin;
|
||||
select is(count(*), 1::bigint)
|
||||
from host_set hs
|
||||
join host_catalog hc on hs.catalog_id = hc.public_id
|
||||
where hc.scope_id = 'p____bwidget'
|
||||
where hc.project_id = 'p____bwidget'
|
||||
and hc.public_id = 'c___wb-plghcl'
|
||||
and hs.public_id = 's___1wb-plghs';
|
||||
|
||||
select is(count(*), 1::bigint)
|
||||
from host_set hs
|
||||
join host_catalog hc on hs.catalog_id = hc.public_id
|
||||
where hc.scope_id = 'p____swidget'
|
||||
where hc.project_id = 'p____swidget'
|
||||
and hc.public_id = 'c___ws-plghcl'
|
||||
and hs.public_id = 's___1ws-plghs';
|
||||
|
||||
insert into target
|
||||
(scope_id, public_id)
|
||||
(project_id, public_id)
|
||||
values
|
||||
('p____bwidget', 'test______wb');
|
||||
|
||||
prepare insert_valid_target_host_set as
|
||||
insert into target_host_set
|
||||
(target_id, host_set_id)
|
||||
(project_id, target_id, host_set_id)
|
||||
values
|
||||
('test______wb', 's___1wb-plghs');
|
||||
('p____bwidget', 'test______wb', 's___1wb-plghs');
|
||||
select lives_ok('insert_valid_target_host_set', 'insert valid target_host_set failed');
|
||||
|
||||
prepare insert_invalid_target_host_set as
|
||||
insert into target_host_set
|
||||
(target_id, host_set_id)
|
||||
(project_id, target_id, host_set_id)
|
||||
values
|
||||
('test______wb', 's___1ws-plghs');
|
||||
select throws_ok('insert_invalid_target_host_set', '23000', null, 'insert invalid target_host_set succeeded');
|
||||
('p____bwidget', 'test______wb', 's___1ws-plghs');
|
||||
select throws_ok('insert_invalid_target_host_set', '23503', null, 'insert invalid target_host_set succeeded');
|
||||
|
||||
select * from finish();
|
||||
rollback;
|
||||
Reference in new issue
Block a user