test(sql): Refactor the colors persona

This changes multiple IDs in the colors persona to be 12 characters. It
also renames some IDs in an attempt to make them more consistent. This
also changes the order of the columns in some insert statements to
follow the pattern of the other insert statements.

This also adds documentation to the top of colors persona file in an
attempt to explain the general patterns being followed in the file.
This commit is contained in:
Michael Gaffney authored and Timothy Messier committed 2023-05-31 12:18:19 +00:00
1 parent 03b1291b34
commit 3769f0851c
12 files changed
+299 -266

No files matched your search

@@ -11,14 +11,14 @@ begin;
select is(count(*), 1::bigint) from session_state where session_id = 's1_____carly' and state='active';
-- Check that we have 5 sessions using this host set
select is(count(*), 5::bigint) from session_host_set_host where host_set_id = 's___1cb-sths';
select is(count(*), 5::bigint) from session_host_set_host where host_set_id = 'hs__st____b1';
-- Delete host set, expect no errors
delete from host_set where public_id = 's___1cb-sths';
select is(count(*), 0::bigint) from host_set where public_id = 's___1cb-sths';
delete from host_set where public_id = 'hs__st____b1';
select is(count(*), 0::bigint) from host_set where public_id = 'hs__st____b1';
-- Ensure we no longer have sessions associated with this host set
select is(count(*), 0::bigint) from session_host_set_host where host_set_id = 's___1cb-sths';
select is(count(*), 0::bigint) from session_host_set_host where host_set_id = 'hs__st____b1';
-- Ensure sessions that were pending or active are now in canceling state
select is(count(*), 1::bigint) from session_state where state = 'canceling' and session_id = 's1_____clare';