Skip to content

Commit

Permalink
Merge pull request #52 from nyaruka/test_fix
Browse files Browse the repository at this point in the history
Fix test so that we don't have dupe flow run uuids
  • Loading branch information
rowanseymour authored Oct 1, 2021
2 parents 30f28aa + 0f16b4b commit 7c443bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion archiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func TestArchiveOrgRuns(t *testing.T) {
assert.Equal(t, DayPeriod, created[11].Period)
assert.Equal(t, 1, created[11].RecordCount)
assert.Equal(t, int64(427), created[11].Size)
assert.Equal(t, "bf08041cef314492fee2910357ec4189", created[11].Hash)
assert.Equal(t, "ca36409e2623005b12c221cb3502cc30", created[11].Hash)

assert.Equal(t, 12, len(deleted))

Expand Down
4 changes: 2 additions & 2 deletions testdb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ DROP TABLE IF EXISTS flows_flowrun CASCADE;
CREATE TABLE flows_flowrun (
id serial primary key,
is_active boolean NOT NULL DEFAULT FALSE,
uuid character varying(36) NOT NULL,
uuid character varying(36) NOT NULL UNIQUE,
responded boolean NOT NULL,
contact_id integer NOT NULL references contacts_contact(id),
flow_id integer NOT NULL references flows_flow(id),
Expand Down Expand Up @@ -319,7 +319,7 @@ INSERT INTO flows_flowrun(id, uuid, responded, contact_id, flow_id, org_id, resu
'[{"uuid": "600ac5b4-4895-4161-ad97-6e2f1bb48bcb", "node_uuid": "accbc6e2-b0df-46cd-9a76-bff0fdf4d753", "arrived_on": "2017-08-12T15:07:24.049815+02:00", "exit_uuid": "8249e2dc-c893-4200-b6d2-398d07a459bc"}]',
'[{"msg": {"urn": "tel:+12076661212", "text": "hola", "uuid": "9ea50923-0888-4596-9a9d-4890994934a9", "channel": {"name": "1223", "uuid": "d6597e08-8285-428c-8e7e-97c68adfa073"}}, "type": "msg_created", "step_uuid": "ae067248-df92-41c8-bb29-92506e984259", "created_on": "2018-01-22T15:06:47.357682+00:00"}]',
'2017-08-10 21:11:59.890662+02:00','2017-08-10 21:11:59.890662+02:00','2017-08-10 21:11:59.890662+02:00', 'C', 'C', NULL, 1),
(4, 'de782b35-a398-46ed-8550-34c66053841b', TRUE, 7, 2, 3,
(4, '329a5d24-64fc-479c-8d24-9674c9b46530', TRUE, 7, 2, 3,
'{"agree": {"category": "Disagree", "node_uuid": "084c8cf1-715d-4d0a-b38d-a616ed74e638", "name": "Agree", "value": "B", "created_on": "2017-10-10T12:25:21.714339+00:00", "input": "B"}}',
'[{"uuid": "babf4fc8-e12c-4bb9-a9dd-61178a118b5a", "node_uuid": "accbc6e2-b0df-46cd-9a76-bff0fdf4d753", "arrived_on": "2017-10-12T15:07:24.049815+02:00", "exit_uuid": "8249e2dc-c893-4200-b6d2-398d07a459bc"}]',
'[{"msg": {"urn": "tel:+12076661212", "text": "hi hi", "uuid": "543d2c4b-ff0b-4b87-a9a4-b2d6745cf470", "channel": {"name": "1223", "uuid": "d6597e08-8285-428c-8e7e-97c68adfa073"}}, "type": "msg_created", "step_uuid": "3a5014dd-7b14-4b7a-be52-0419c09340a6", "created_on": "2018-10-12T15:06:47.357682+00:00"}]',
Expand Down

0 comments on commit 7c443bc

Please sign in to comment.