Skip to content

Commit

Permalink
Allow web tests to take substitutions so things like UUIDs don't alwa…
Browse files Browse the repository at this point in the history
…ys have to be fixed
  • Loading branch information
rowanseymour committed Jun 24, 2021
1 parent ebf0dcf commit 3a9a6c8
Show file tree
Hide file tree
Showing 23 changed files with 104 additions and 114 deletions.
9 changes: 3 additions & 6 deletions core/models/contacts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,9 @@ func TestContacts(t *testing.T) {
db := testsuite.DB()

testdata.InsertContactURN(t, db, testdata.Org1, testdata.Bob, "whatsapp:250788373373", 999)
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk,
"f808c16d-10ed-4dfd-a6d4-6331c0d618f8", "Problem!", "Where are my shoes?", "1234", testdata.Agent)
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk,
"ddf9aa25-73d8-4c5a-bf63-f4e9525bbb3e", "Another Problem!", "Where are my pants?", "2345", nil)
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Bob, testdata.Mailgun,
"e86d6cc3-6acc-49d0-9a50-287e4794e415", "Urgent", "His name is Bob", "", testdata.Editor)
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk, "Problem!", "Where are my shoes?", "1234", testdata.Agent)
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk, "Another Problem!", "Where are my pants?", "2345", nil)
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Bob, testdata.Mailgun, "Urgent", "His name is Bob", "", testdata.Editor)

// delete mailgun ticketer
db.MustExec(`UPDATE tickets_ticketer SET is_active = false WHERE id = $1`, testdata.Mailgun.ID)
Expand Down
3 changes: 1 addition & 2 deletions core/models/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/nyaruka/gocommon/dates"
"github.com/nyaruka/gocommon/urns"
"github.com/nyaruka/gocommon/uuids"
"github.com/nyaruka/goflow/assets"
"github.com/nyaruka/goflow/envs"
"github.com/nyaruka/goflow/flows"
Expand Down Expand Up @@ -287,7 +286,7 @@ func TestNonPersistentBroadcasts(t *testing.T) {

db.MustExec(`DELETE FROM msgs_msg`)

ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Bob, testdata.Mailgun, flows.TicketUUID(uuids.New()), "Problem", "", "", nil)
ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Bob, testdata.Mailgun, "Problem", "", "", nil)
modelTicket := ticket.Load(t, db)

translations := map[envs.Language]*models.BroadcastTranslation{envs.Language("eng"): {Text: "Hi there"}}
Expand Down
14 changes: 7 additions & 7 deletions core/models/tickets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func TestUpdateTicketConfig(t *testing.T) {
rt := testsuite.RT()
db := rt.DB

ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "ba847748-cfb4-4d79-8906-02bc854e0361", "Problem", "Where my shoes", "123", nil)
ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Problem", "Where my shoes", "123", nil)
modelTicket := ticket.Load(t, db)

// empty configs are null
Expand All @@ -167,7 +167,7 @@ func TestUpdateTicketLastActivity(t *testing.T) {
defer dates.SetNowSource(dates.DefaultNowSource)
dates.SetNowSource(dates.NewFixedNowSource(now))

ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "c9c2c4e9-9b9f-47be-a4cf-d15d8602c413", "Problem", "Where my shoes", "123", nil)
ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Problem", "Where my shoes", "123", nil)
modelTicket := ticket.Load(t, db)

models.UpdateTicketLastActivity(ctx, db, []*models.Ticket{modelTicket})
Expand Down Expand Up @@ -198,10 +198,10 @@ func TestCloseTickets(t *testing.T) {
oa, err := models.GetOrgAssetsWithRefresh(ctx, db, testdata.Org1.ID, models.RefreshTicketers)
require.NoError(t, err)

ticket1 := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "e5f79dca-5625-4ec6-9a4f-e30764fb5cfa", "Problem", "Where my shoes", "123", nil)
ticket1 := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Problem", "Where my shoes", "123", nil)
modelTicket1 := ticket1.Load(t, db)

ticket2 := testdata.InsertClosedTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk, "4d507510-77ce-4cc0-8ee7-c3f1ead7a284", "Old Problem", "Where my pants", "234", nil)
ticket2 := testdata.InsertClosedTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk, "Old Problem", "Where my pants", "234", nil)
modelTicket2 := ticket2.Load(t, db)

logger := &models.HTTPLogger{}
Expand All @@ -226,7 +226,7 @@ func TestCloseTickets(t *testing.T) {
testsuite.AssertQueryCount(t, db, `SELECT count(*) FROM tickets_ticketevent WHERE ticket_id = $1 AND event_type = 'C'`, []interface{}{ticket2.ID}, 0)

// can close tickets without a user
ticket3 := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "94a94641-ac10-414d-8d22-959be6a6792e", "Problem", "Where my shoes", "123", nil)
ticket3 := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Problem", "Where my shoes", "123", nil)
modelTicket3 := ticket3.Load(t, db)

evts, err = models.CloseTickets(ctx, db, oa, models.NilUserID, []*models.Ticket{modelTicket3}, false, logger)
Expand Down Expand Up @@ -257,10 +257,10 @@ func TestReopenTickets(t *testing.T) {
oa, err := models.GetOrgAssetsWithRefresh(ctx, db, testdata.Org1.ID, models.RefreshTicketers)
require.NoError(t, err)

ticket1 := testdata.InsertClosedTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "e5f79dca-5625-4ec6-9a4f-e30764fb5cfa", "Problem", "Where my shoes", "123", nil)
ticket1 := testdata.InsertClosedTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Problem", "Where my shoes", "123", nil)
modelTicket1 := ticket1.Load(t, db)

ticket2 := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk, "4d507510-77ce-4cc0-8ee7-c3f1ead7a284", "Old Problem", "Where my pants", "234", nil)
ticket2 := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk, "Old Problem", "Where my pants", "234", nil)
modelTicket2 := ticket2.Load(t, db)

logger := &models.HTTPLogger{}
Expand Down
2 changes: 1 addition & 1 deletion core/tasks/broadcasts/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func TestBroadcastTask(t *testing.T) {
VALUES('P', '"base"=>"hi @(PROPER(contact.name)) legacy"'::hstore, 'base', TRUE, NOW(), NOW(), FALSE, 1, 1, 1) RETURNING id`)
require.NoError(t, err)

ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "bbaf0ea9-ac25-4221-87d1-aca1795c8bfe", "Problem", "", "", nil)
ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Problem", "", "", nil)
modelTicket := ticket.Load(t, db)

evaluated := map[envs.Language]*models.BroadcastTranslation{
Expand Down
17 changes: 7 additions & 10 deletions core/tasks/handler/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ func TestMsgEvents(t *testing.T) {
testdata.InsertCatchallTrigger(t, db, testdata.Org2, testdata.Org2SingleMessage, nil, nil)

// give Cathy an open ticket
cathyTicket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "aa906c81-7766-427c-9ffd-9a86e49bd657", "Hi there", "Ok", "", nil)
cathyTicket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Hi there", "Ok", "", nil)

// give Bob a closed ticket
bobTicket := testdata.InsertClosedTicket(t, db, testdata.Org1, testdata.Bob, testdata.Mailgun, "46faf0f3-5558-4865-bd8e-b3c83cdb5770", "Hi there", "Ok", "", nil)
bobTicket := testdata.InsertClosedTicket(t, db, testdata.Org1, testdata.Bob, testdata.Mailgun, "Hi there", "Ok", "", nil)

db.MustExec(`UPDATE tickets_ticket SET last_activity_on = '2021-01-01T00:00:00Z' WHERE id IN ($1, $2)`, cathyTicket.ID, bobTicket.ID)

Expand Down Expand Up @@ -297,24 +297,21 @@ func TestChannelEvents(t *testing.T) {
}

func TestTicketEvents(t *testing.T) {
testsuite.Reset()
ctx, db, _ := testsuite.Reset()
rt := testsuite.RT()
ctx := testsuite.CTX()

rc := rt.RP.Get()
defer rc.Close()

// add a ticket closed trigger
testdata.InsertTicketClosedTrigger(t, rt.DB, testdata.Org1, testdata.Favorites)

ticket := testdata.InsertClosedTicket(t, rt.DB, testdata.Org1, testdata.Cathy, testdata.Mailgun, "81db050c-e8c8-446d-9d15-60287a498842", "Problem", "Where are my shoes?", "", nil)

tickets, err := models.LoadTickets(ctx, rt.DB, []models.TicketID{ticket.ID})
require.NoError(t, err)
ticket := testdata.InsertClosedTicket(t, rt.DB, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Problem", "Where are my shoes?", "", nil)
modelTicket := ticket.Load(t, db)

event := models.NewTicketEvent(testdata.Org1.ID, testdata.Admin.ID, tickets[0].ContactID(), tickets[0].ID(), models.TicketEventTypeClosed)
event := models.NewTicketEvent(testdata.Org1.ID, testdata.Admin.ID, modelTicket.ContactID(), modelTicket.ID(), models.TicketEventTypeClosed)

err = handler.QueueTicketEvent(rc, testdata.Cathy.ID, event)
err := handler.QueueTicketEvent(rc, testdata.Cathy.ID, event)
require.NoError(t, err)

task, err := queue.PopNextTask(rc, queue.HandlerQueue)
Expand Down
18 changes: 9 additions & 9 deletions services/tickets/mailgun/testdata/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"body": [
{
"name": "recipient",
"data": "ticket+c69f103c-db64-4481-815b-1112890419ef@mr.nyaruka.com"
"data": "ticket+$cathy_ticket_uuid$@mr.nyaruka.com"
},
{
"name": "sender",
Expand Down Expand Up @@ -178,7 +178,7 @@
"body": [
{
"name": "recipient",
"data": "ticket+c69f103c-db64-4481-815b-1112890419ef@mr.nyaruka.com"
"data": "ticket+$cathy_ticket_uuid$@mr.nyaruka.com"
},
{
"name": "sender",
Expand Down Expand Up @@ -213,18 +213,18 @@
"status": 200,
"response": {
"action": "rejected",
"ticket_uuid": "c69f103c-db64-4481-815b-1112890419ef"
"ticket_uuid": "$cathy_ticket_uuid$"
}
},
{
"label": "forwarded response if message was created (no attachments, request sent as urlencoded form)",
"method": "POST",
"path": "/mr/tickets/types/mailgun/receive",
"body": "recipient=ticket%2Bc69f103c-db64-4481-815b-1112890419ef%40mr.nyaruka.com&sender=bob%40acme.com&subject=Re%3A%20%5BRapidPro-Tickets%5D%20New%20ticket&Message-Id=%3C12345%40mail.gmail.com%3E&stripped-text=Hello&timestamp=1590088411&token=987654321&signature=3300d885d266c13e8804f032f8f7eb34c3b1abb071c8a8d9fb8dfb7d2184107e",
"body": "recipient=ticket%2B$cathy_ticket_uuid$%40mr.nyaruka.com&sender=bob%40acme.com&subject=Re%3A%20%5BRapidPro-Tickets%5D%20New%20ticket&Message-Id=%3C12345%40mail.gmail.com%3E&stripped-text=Hello&timestamp=1590088411&token=987654321&signature=3300d885d266c13e8804f032f8f7eb34c3b1abb071c8a8d9fb8dfb7d2184107e",
"status": 200,
"response": {
"action": "forwarded",
"ticket_uuid": "c69f103c-db64-4481-815b-1112890419ef",
"ticket_uuid": "$cathy_ticket_uuid$",
"msg_uuid": "692926ea-09d6-4942-bd38-d266ec8d3716"
},
"db_assertions": [
Expand All @@ -245,7 +245,7 @@
"body": [
{
"name": "recipient",
"data": "ticket+c69f103c-db64-4481-815b-1112890419ef@mr.nyaruka.com"
"data": "ticket+$cathy_ticket_uuid$@mr.nyaruka.com"
},
{
"name": "sender",
Expand Down Expand Up @@ -296,7 +296,7 @@
"status": 200,
"response": {
"action": "forwarded",
"ticket_uuid": "c69f103c-db64-4481-815b-1112890419ef",
"ticket_uuid": "$cathy_ticket_uuid$",
"msg_uuid": "5802813d-6c58-4292-8228-9728778b6c98"
},
"db_assertions": [
Expand Down Expand Up @@ -325,7 +325,7 @@
"body": [
{
"name": "recipient",
"data": "ticket+c69f103c-db64-4481-815b-1112890419ef@mr.nyaruka.com"
"data": "ticket+$cathy_ticket_uuid$@mr.nyaruka.com"
},
{
"name": "sender",
Expand Down Expand Up @@ -360,7 +360,7 @@
"status": 200,
"response": {
"action": "closed",
"ticket_uuid": "c69f103c-db64-4481-815b-1112890419ef"
"ticket_uuid": "$cathy_ticket_uuid$"
},
"db_assertions": [
{
Expand Down
4 changes: 2 additions & 2 deletions services/tickets/mailgun/web_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestReceive(t *testing.T) {
db.MustExec(`DELETE FROM msgs_msg`)

// create a mailgun ticket for Cathy
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "c69f103c-db64-4481-815b-1112890419ef", "Need help", "Have you seen my cookies?", "", nil)
ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Need help", "Have you seen my cookies?", "", nil)

web.RunWebTests(t, "testdata/receive.json")
web.RunWebTests(t, "testdata/receive.json", map[string]string{"cathy_ticket_uuid": string(ticket.UUID)})
}
18 changes: 10 additions & 8 deletions services/tickets/rocketchat/testdata/event_callback.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
},
"body": {
"type": "other",
"ticketID": "c69f103c-db64-4481-815b-1112890419ef",
"ticketID": "$cathy_ticket_uuid$",
"visitor": {
"token": "1234"
},
Expand All @@ -133,7 +133,7 @@
},
"body": {
"type": "agent-message",
"ticketID": "c69f103c-db64-4481-815b-1112890419ef",
"ticketID": "$cathy_ticket_uuid$",
"visitor": {
"token": "1234"
},
Expand Down Expand Up @@ -165,15 +165,17 @@
},
"body": {
"type": "agent-message",
"ticketID": "c69f103c-db64-4481-815b-1112890419ef",
"ticketID": "$cathy_ticket_uuid$",
"visitor": {
"token": "1234"
},
"data": {
"attachments": [{
"type": "image/jpg",
"url": "https://link.to/image.jpg"
}]
"attachments": [
{
"type": "image/jpg",
"url": "https://link.to/image.jpg"
}
]
}
},
"http_mocks": {
Expand Down Expand Up @@ -204,7 +206,7 @@
},
"body": {
"type": "close-room",
"ticketID": "c69f103c-db64-4481-815b-1112890419ef",
"ticketID": "$cathy_ticket_uuid$",
"visitor": {
"token": "1234"
}
Expand Down
4 changes: 2 additions & 2 deletions services/tickets/rocketchat/web_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestEventCallback(t *testing.T) {
db.MustExec(`DELETE FROM msgs_msg`)

// create a rocketchat ticket for Cathy
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.RocketChat, "c69f103c-db64-4481-815b-1112890419ef", "Need help", "Have you seen my cookies?", "1234", nil)
ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.RocketChat, "Need help", "Have you seen my cookies?", "1234", nil)

web.RunWebTests(t, "testdata/event_callback.json")
web.RunWebTests(t, "testdata/event_callback.json", map[string]string{"cathy_ticket_uuid": string(ticket.UUID)})
}
32 changes: 12 additions & 20 deletions services/tickets/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/nyaruka/gocommon/httpx"
"github.com/nyaruka/gocommon/uuids"
"github.com/nyaruka/goflow/envs"
"github.com/nyaruka/goflow/flows"
"github.com/nyaruka/goflow/utils"
"github.com/nyaruka/mailroom/core/models"
"github.com/nyaruka/mailroom/services/tickets"
Expand Down Expand Up @@ -53,12 +52,9 @@ func TestFromTicketUUID(t *testing.T) {
ctx := testsuite.CTX()
db := testsuite.DB()

ticket1UUID := flows.TicketUUID("f7358870-c3dd-450d-b5ae-db2eb50216ba")
ticket2UUID := flows.TicketUUID("44b7d9b5-6ddd-4a6a-a1c0-8b70ecd06339")

// create some tickets
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, ticket1UUID, "Need help", "Have you seen my cookies?", "", nil)
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk, ticket2UUID, "Need help", "Have you seen my shoes?", "", nil)
ticket1 := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Need help", "Have you seen my cookies?", "", nil)
ticket2 := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Zendesk, "Need help", "Have you seen my shoes?", "", nil)

// break mailgun configuration
db.MustExec(`UPDATE tickets_ticketer SET config = '{"foo":"bar"}'::jsonb WHERE id = $1`, testdata.Mailgun.ID)
Expand All @@ -70,18 +66,18 @@ func TestFromTicketUUID(t *testing.T) {
assert.EqualError(t, err, "error looking up ticket 33c54d0c-bd49-4edf-87a9-c391a75a630c")

// err if no ticketer type doesn't match
_, _, _, err = tickets.FromTicketUUID(ctx, db, ticket1UUID, "zendesk")
_, _, _, err = tickets.FromTicketUUID(ctx, db, ticket1.UUID, "zendesk")
assert.EqualError(t, err, "error looking up ticketer #1")

// err if ticketer isn't configured correctly and can't be loaded as a service
_, _, _, err = tickets.FromTicketUUID(ctx, db, ticket1UUID, "mailgun")
_, _, _, err = tickets.FromTicketUUID(ctx, db, ticket1.UUID, "mailgun")
assert.EqualError(t, err, "error loading ticketer service: missing domain or api_key or to_address or url_base in mailgun config")

// if all is correct, returns the ticket, ticketer asset, and ticket service
ticket, ticketer, svc, err := tickets.FromTicketUUID(ctx, db, ticket2UUID, "zendesk")
ticket, ticketer, svc, err := tickets.FromTicketUUID(ctx, db, ticket2.UUID, "zendesk")

assert.NoError(t, err)
assert.Equal(t, ticket2UUID, ticket.UUID())
assert.Equal(t, ticket2.UUID, ticket.UUID())
assert.Equal(t, testdata.Zendesk.UUID, ticketer.UUID())
assert.Implements(t, (*models.TicketService)(nil), svc)

Expand Down Expand Up @@ -135,24 +131,20 @@ func TestSendReply(t *testing.T) {

image := &tickets.File{URL: "http://coolfiles.com/a.jpg", ContentType: "image/jpeg", Body: imageBody}

ticketUUID := flows.TicketUUID("f7358870-c3dd-450d-b5ae-db2eb50216ba")

// create a ticket
testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, ticketUUID, "Need help", "Have you seen my cookies?", "", nil)

ticket, err := models.LookupTicketByUUID(ctx, db, ticketUUID)
require.NoError(t, err)
ticket := testdata.InsertOpenTicket(t, db, testdata.Org1, testdata.Cathy, testdata.Mailgun, "Need help", "Have you seen my cookies?", "", nil)
modelTicket := ticket.Load(t, db)

msg, err := tickets.SendReply(ctx, rt, ticket, "I'll get back to you", []*tickets.File{image})
msg, err := tickets.SendReply(ctx, rt, modelTicket, "I'll get back to you", []*tickets.File{image})
require.NoError(t, err)

assert.Equal(t, "I'll get back to you", msg.Text())
assert.Equal(t, testdata.Cathy.ID, msg.ContactID())
assert.Equal(t, []utils.Attachment{"image/jpeg:https:///_test_media_storage/media/1/1ae9/6956/1ae96956-4b34-433e-8d1a-f05fe6923d6d.jpg"}, msg.Attachments())
assert.FileExists(t, "_test_media_storage/media/1/1ae9/6956/1ae96956-4b34-433e-8d1a-f05fe6923d6d.jpg")
assert.Equal(t, []utils.Attachment{"image/jpeg:https:///_test_media_storage/media/1/e718/7099/e7187099-7d38-4f60-955c-325957214c42.jpg"}, msg.Attachments())
assert.FileExists(t, "_test_media_storage/media/1/e718/7099/e7187099-7d38-4f60-955c-325957214c42.jpg")

// try with file that can't be read (i.e. same file again which is already closed)
_, err = tickets.SendReply(ctx, rt, ticket, "I'll get back to you", []*tickets.File{image})
_, err = tickets.SendReply(ctx, rt, modelTicket, "I'll get back to you", []*tickets.File{image})
assert.EqualError(t, err, "error storing attachment http://coolfiles.com/a.jpg for ticket reply: unable to read attachment content: read ../../core/models/testdata/test.jpg: file already closed")
}

Expand Down
Loading

0 comments on commit 3a9a6c8

Please sign in to comment.