Skip to content

Commit

Permalink
Fix mailroom_test.dump
Browse files Browse the repository at this point in the history
  • Loading branch information
Robi9 committed Nov 3, 2023
1 parent 065db52 commit 1ad4d86
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions core/handlers/msg_catalog_created_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,23 @@ WHERE id=$1;`,
},
}

_, err := db.Exec(catalogProductDDL)
if err != nil {
t.Fatal(err)
}
// _, err := db.Exec(catalogProductDDL)
// if err != nil {
// t.Fatal(err)
// }

_, err = db.Exec(`INSERT INTO public.wpp_products_catalog
_, err := db.Exec(`INSERT INTO public.wpp_products_catalog
(uuid, facebook_catalog_id, "name", created_on, modified_on, is_active, channel_id, org_id)
VALUES('2be9092a-1c97-4b24-906f-f0fbe3e1e93e', '123456789', 'Catalog Dummy', now(), now(), true, $1, $2);
`, testdata.TwilioChannel.ID, testdata.Org1.ID)
assert.NoError(t, err)

rt.Config.WeniGPTBaseURL = "https://wenigpt.weni.ai"
rt.Config.SentenXBaseURL = "https://sentenx.weni.ai"
rt.Config.WenigptBaseURL = "https://wenigpt.weni.ai"
rt.Config.SentenxBaseURL = "https://sentenx.weni.ai"

httpx.SetRequestor(httpx.NewMockRequestor(map[string][]httpx.MockResponse{
// WeniGPT
rt.Config.WeniGPTBaseURL: {
rt.Config.WenigptBaseURL: {
httpx.NewMockResponse(200, nil, `{
"delayTime": 2,
"executionTime": 2,
Expand All @@ -162,7 +162,7 @@ WHERE id=$1;`,
}`),
},
// SentenX
rt.Config.SentenXBaseURL + "/products/search": {
rt.Config.SentenxBaseURL + "/products/search": {
httpx.NewMockResponse(200, nil, `{
"products": [
{
Expand Down Expand Up @@ -196,18 +196,18 @@ WHERE id=$1;`,
assert.Equal(t, 1, count)
}

const (
catalogProductDDL = `
CREATE TABLE public.wpp_products_catalog (
id serial4 NOT NULL,
uuid uuid NOT NULL,
facebook_catalog_id varchar(30) NOT NULL,
"name" varchar(100) NOT NULL,
created_on timestamptz NOT NULL,
modified_on timestamptz NOT NULL,
is_active bool NOT NULL,
channel_id int4 NOT NULL,
org_id int4 NOT NULL
);
`
)
// const (
// catalogProductDDL = `
// CREATE TABLE public.wpp_products_catalog (
// id serial4 NOT NULL,
// uuid uuid NOT NULL,
// facebook_catalog_id varchar(30) NOT NULL,
// "name" varchar(100) NOT NULL,
// created_on timestamptz NOT NULL,
// modified_on timestamptz NOT NULL,
// is_active bool NOT NULL,
// channel_id int4 NOT NULL,
// org_id int4 NOT NULL
// );
// `
// )
Binary file modified mailroom_test.dump
Binary file not shown.

0 comments on commit 1ad4d86

Please sign in to comment.