internal/db/sqltest: fix sessions aggregate (#3152)
The sessions aggregate was inserting host_id and host_set_id, columns which are no longer present on the session table. Also fix the test that guards against regressions like this in the future.
This commit is contained in:
1 parent
d59ca6b7d1
commit
ecdb77b584
3 files changed
+6
-4
No files matched your search
@@ -4,14 +4,16 @@
|
||||
begin;
|
||||
-- wtt_load populates tables for the given test persona and set of aggregates.
|
||||
-- Valid personas are:
|
||||
-- * colors
|
||||
-- * widgets
|
||||
--
|
||||
-- Valid aggregates:
|
||||
-- * iam
|
||||
-- * kms
|
||||
-- * auth
|
||||
-- * hosts
|
||||
-- * targets
|
||||
-- * credentials
|
||||
-- * sessions
|
||||
--
|
||||
-- Note that some aggregates depend on data from other aggretates, so the order
|
||||
-- that they are passed to this function matters.
|
||||
|
||||
@@ -474,9 +474,9 @@ create function _wtt_load_widgets_sessions() returns void
|
||||
as $$
|
||||
begin
|
||||
insert into session
|
||||
(project_id, target_id, host_set_id, host_id, user_id, auth_token_id, certificate, endpoint, public_id)
|
||||
(project_id, target_id, user_id, auth_token_id, certificate, endpoint, public_id)
|
||||
values
|
||||
('p____swidget', 't_________wb', 's___1wb-sths', 'h_____wb__01', 'u_____warren', 'tok___warren', 'abc'::bytea, 'ep1', 's1____warren');
|
||||
('p____swidget', 't_________wb', 'u_____warren', 'tok___warren', 'abc'::bytea, 'ep1', 's1____warren');
|
||||
end;
|
||||
$$ language plpgsql;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
begin;
|
||||
select plan(1);
|
||||
|
||||
select lives_ok($$select wtt_load('widgets', 'iam', 'kms', 'auth', 'hosts', 'targets')$$);
|
||||
select lives_ok($$select wtt_load('widgets', 'iam', 'kms', 'auth', 'hosts', 'targets', 'credentials', 'sessions')$$);
|
||||
|
||||
select * from finish();
|
||||
rollback;
|
||||
Reference in new issue
Block a user