Skip to content

Commit

Permalink
Merge pull request #358 from nyaruka/update_testdb
Browse files Browse the repository at this point in the history
Update test database
  • Loading branch information
rowanseymour authored Nov 8, 2024
2 parents 97484cc + ecf528e commit 6c6faf4
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion core/tasks/msgs/send_broadcast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func TestSendBroadcastTask(t *testing.T) {
createdByID: testdata.Agent.ID,
queue: tasks.HandlerQueue,
expectedBatches: 1,
expectedMsgs: map[string]int{"hi Cathy from Nyaruka goflow URN: tel:+12065551212 Gender: F": 1},
expectedMsgs: map[string]int{"hi Cathy from TextIt goflow URN: tel:+12065551212 Gender: F": 1},
},
{
translations: flows.BroadcastTranslations{
Expand Down
2 changes: 1 addition & 1 deletion services/ivr/twiml/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func TestURNForRequest(t *testing.T) {
s := twiml.NewService(http.DefaultClient, "12345", "sesame")

makeRequest := func(body string) *http.Request {
r, _ := http.NewRequest("POST", "http://nyaruka.com/12345/incoming", strings.NewReader(body))
r, _ := http.NewRequest("POST", "http://textit.com/12345/incoming", strings.NewReader(body))
r.Header.Add("Content-Type", "application/x-www-form-urlencoded")
r.Header.Add("Content-Length", strconv.Itoa(len(body)))
return r
Expand Down
16 changes: 8 additions & 8 deletions testsuite/testdata/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ var AuthGroupIDs = map[string]int{
}

var Org1 = &Org{1, "bf0514a5-9407-44c9-b0f9-3f36f9c18414"}
var Admin = &User{3, "admin1@nyaruka.com"}
var Editor = &User{4, "editor1@nyaruka.com"}
var Viewer = &User{5, "viewer1@nyaruka.com"}
var Agent = &User{6, "agent1@nyaruka.com"}
var Admin = &User{3, "admin1@textit.com"}
var Editor = &User{4, "editor1@textit.com"}
var Viewer = &User{5, "viewer1@textit.com"}
var Agent = &User{6, "agent1@textit.com"}

var TwilioChannel = &Channel{10000, "74729f45-7f29-4868-9dc4-90e491e3c7d8", "T"}
var VonageChannel = &Channel{10001, "19012bfd-3ce3-4cae-9bb9-76cf92c73d49", "NX"}
Expand Down Expand Up @@ -62,12 +62,12 @@ var TestingLabel = &Label{10001, "a6338cdc-7938-4437-8b05-2d5d785e3a08"}
var ReviveTemplate = &Template{10000, "9c22b594-fcab-4b29-9bcb-ce4404894a80"}
var GoodbyeTemplate = &Template{10001, "3b8dd151-1a91-411f-90cb-dd9065bb7a71"}

var DefaultTopic = &Topic{1, "fd18a69d-7514-4b76-9fad-072641995e17"}
var DefaultTopic = &Topic{1, "4307df2e-b00b-42b6-922b-4a1dcfc268d8"}
var SalesTopic = &Topic{2, "9ef2ff21-064a-41f1-8560-ccc990b4f937"}
var SupportTopic = &Topic{3, "0a8f2e00-fef6-402c-bd79-d789446ec0e0"}

var Partners = &Team{1, "4321c30b-b596-46fa-adb4-4a46d37923f6"}
var Office = &Team{2, "f14c1762-d38b-4072-ae63-2705332a3719"}
var Partners = &Team{2, "4321c30b-b596-46fa-adb4-4a46d37923f6"}
var Office = &Team{3, "f14c1762-d38b-4072-ae63-2705332a3719"}

var Luis = &Classifier{1, "097e026c-ae79-4740-af67-656dbedf0263"}
var Wit = &Classifier{2, "ff2a817c-040a-4eb2-8404-7d92e8b79dd0"}
Expand All @@ -80,7 +80,7 @@ var RemindersEvent3 = &CampaignEvent{10002, "3e4f06c2-e04f-47ca-a047-f5252b3160e

// secondary org.. only a few things
var Org2 = &Org{2, "3ae7cdeb-fd96-46e5-abc4-a4622f349921"}
var Org2Admin = &User{8, "admin2@nyaruka.com"}
var Org2Admin = &User{8, "admin2@textit.com"}
var Org2Channel = &Channel{20000, "a89bc872-3763-4b95-91d9-31d4e56c6651", "T"}
var Org2Contact = &Contact{20000, "26d20b72-f7d8-44dc-87f2-aae046dbff95", "tel:+250700000005", 20000}
var Org2Favorites = &Flow{20000, "f161bd16-3c60-40bd-8c92-228ce815b9cd"}
Expand Down
Binary file modified testsuite/testfiles/postgres.dump
Binary file not shown.
10 changes: 5 additions & 5 deletions web/contact/testdata/modify.json
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@
},
"note": "Need help",
"assignee": {
"email": "admin1@nyaruka.com",
"email": "admin1@textit.com",
"name": "Andy Admin"
}
}
Expand Down Expand Up @@ -1400,7 +1400,7 @@
"name": "Support"
},
"assignee": {
"email": "admin1@nyaruka.com",
"email": "admin1@textit.com",
"name": "Andy Admin"
}
}
Expand All @@ -1416,7 +1416,7 @@
"name": "Support"
},
"assignee": {
"email": "admin1@nyaruka.com",
"email": "admin1@textit.com",
"name": "Andy Admin"
}
},
Expand Down Expand Up @@ -1508,7 +1508,7 @@
"name": "Support"
},
"assignee": {
"email": "admin1@nyaruka.com",
"email": "admin1@textit.com",
"name": "Andy Admin"
}
}
Expand Down Expand Up @@ -1597,7 +1597,7 @@
"name": "Support"
},
"assignee": {
"email": "admin1@nyaruka.com",
"email": "admin1@textit.com",
"name": "Andy Admin"
}
}
Expand Down
6 changes: 3 additions & 3 deletions web/org/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ func TestMetrics(t *testing.T) {
Username: "metrics",
Password: promToken,
Contains: []string{
`rapidpro_group_contact_count{group_name="Active",group_uuid="b97f69f7-5edf-45c7-9fda-d37066eae91d",group_type="system",org="UNICEF"} 124`,
`rapidpro_group_contact_count{group_name="Doctors",group_uuid="c153e265-f7c9-4539-9dbc-9b358714b638",group_type="user",org="UNICEF"} 121`,
`rapidpro_channel_msg_count{channel_name="Vonage",channel_uuid="19012bfd-3ce3-4cae-9bb9-76cf92c73d49",channel_type="NX",msg_direction="out",msg_type="message",org="UNICEF"} 0`,
`rapidpro_group_contact_count{group_name="Active",group_uuid="b97f69f7-5edf-45c7-9fda-d37066eae91d",group_type="system",org="TextIt"} 124`,
`rapidpro_group_contact_count{group_name="Doctors",group_uuid="c153e265-f7c9-4539-9dbc-9b358714b638",group_type="user",org="TextIt"} 121`,
`rapidpro_channel_msg_count{channel_name="Vonage",channel_uuid="19012bfd-3ce3-4cae-9bb9-76cf92c73d49",channel_type="NX",msg_direction="out",msg_type="message",org="TextIt"} 0`,
},
},
}
Expand Down

0 comments on commit 6c6faf4

Please sign in to comment.