mirror of
https://github.com/lukaszraczylo/go-simple-graphql.git
synced 2026-10-17 01:17:43 +00:00
Fix tests to run locally.
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
*.out
|
*.out
|
||||||
*.test
|
*.test
|
||||||
coverage.txt
|
coverage.txt
|
||||||
|
*.DS_Store
|
||||||
+7
-7
@@ -73,7 +73,7 @@ func (suite *TestSuite) Test_GraphQL_Query() {
|
|||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "Valid query, no cache",
|
name: "Valid query, no cache",
|
||||||
endpoint: "http://hasura.local/v1/graphql",
|
endpoint: "https://hasura.local/v1/graphql",
|
||||||
isLocal: true,
|
isLocal: true,
|
||||||
cache_enabled: false,
|
cache_enabled: false,
|
||||||
args: args{
|
args: args{
|
||||||
@@ -84,12 +84,12 @@ func (suite *TestSuite) Test_GraphQL_Query() {
|
|||||||
}`,
|
}`,
|
||||||
queryVariables: nil,
|
queryVariables: nil,
|
||||||
},
|
},
|
||||||
wantResult: `{"tbl_bots":[{"bot_name":"littleMentionBot"}]}`,
|
wantResult: `{"tbl_bots":[{"bot_name":"ThetaGuardianBot"}]}`,
|
||||||
wantErr: false,
|
wantErr: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Valid query, with cache empty",
|
name: "Valid query, with cache empty",
|
||||||
endpoint: "http://hasura.local/v1/graphql",
|
endpoint: "https://hasura.local/v1/graphql",
|
||||||
isLocal: true,
|
isLocal: true,
|
||||||
cache_enabled: true,
|
cache_enabled: true,
|
||||||
args: args{
|
args: args{
|
||||||
@@ -100,12 +100,12 @@ func (suite *TestSuite) Test_GraphQL_Query() {
|
|||||||
}`,
|
}`,
|
||||||
queryVariables: nil,
|
queryVariables: nil,
|
||||||
},
|
},
|
||||||
wantResult: `{"tbl_bots":[{"bot_name":"littleMentionBot"}]}`,
|
wantResult: `{"tbl_bots":[{"bot_name":"ThetaGuardianBot"}]}`,
|
||||||
wantErr: false,
|
wantErr: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Valid query, with cache filled",
|
name: "Valid query, with cache filled",
|
||||||
endpoint: "http://hasura.local/v1/graphql",
|
endpoint: "https://hasura.local/v1/graphql",
|
||||||
isLocal: true,
|
isLocal: true,
|
||||||
cache_enabled: true,
|
cache_enabled: true,
|
||||||
args: args{
|
args: args{
|
||||||
@@ -116,12 +116,12 @@ func (suite *TestSuite) Test_GraphQL_Query() {
|
|||||||
}`,
|
}`,
|
||||||
queryVariables: nil,
|
queryVariables: nil,
|
||||||
},
|
},
|
||||||
wantResult: `{"tbl_bots":[{"bot_name":"littleMentionBot"}]}`,
|
wantResult: `{"tbl_bots":[{"bot_name":"ThetaGuardianBot"}]}`,
|
||||||
wantErr: false,
|
wantErr: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Invalid query",
|
name: "Invalid query",
|
||||||
endpoint: "http://hasura.local/v1/graphql",
|
endpoint: "https://hasura.local/v1/graphql",
|
||||||
isLocal: true,
|
isLocal: true,
|
||||||
args: args{
|
args: args{
|
||||||
queryContent: `query listUserBots {
|
queryContent: `query listUserBots {
|
||||||
|
|||||||
Reference in New Issue
Block a user