From 2b09da76858b5ddc176ebd501cca183d18250fb0 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Fri, 24 Dec 2021 11:11:54 +0000 Subject: [PATCH] Fix tests to run locally. --- .gitignore | 3 ++- query_test.go | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index b66e23c..818ca49 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.out *.test -coverage.txt \ No newline at end of file +coverage.txt +*.DS_Store \ No newline at end of file diff --git a/query_test.go b/query_test.go index 8de2598..82f4f3d 100644 --- a/query_test.go +++ b/query_test.go @@ -73,7 +73,7 @@ func (suite *TestSuite) Test_GraphQL_Query() { }{ { name: "Valid query, no cache", - endpoint: "http://hasura.local/v1/graphql", + endpoint: "https://hasura.local/v1/graphql", isLocal: true, cache_enabled: false, args: args{ @@ -84,12 +84,12 @@ func (suite *TestSuite) Test_GraphQL_Query() { }`, queryVariables: nil, }, - wantResult: `{"tbl_bots":[{"bot_name":"littleMentionBot"}]}`, + wantResult: `{"tbl_bots":[{"bot_name":"ThetaGuardianBot"}]}`, wantErr: false, }, { name: "Valid query, with cache empty", - endpoint: "http://hasura.local/v1/graphql", + endpoint: "https://hasura.local/v1/graphql", isLocal: true, cache_enabled: true, args: args{ @@ -100,12 +100,12 @@ func (suite *TestSuite) Test_GraphQL_Query() { }`, queryVariables: nil, }, - wantResult: `{"tbl_bots":[{"bot_name":"littleMentionBot"}]}`, + wantResult: `{"tbl_bots":[{"bot_name":"ThetaGuardianBot"}]}`, wantErr: false, }, { name: "Valid query, with cache filled", - endpoint: "http://hasura.local/v1/graphql", + endpoint: "https://hasura.local/v1/graphql", isLocal: true, cache_enabled: true, args: args{ @@ -116,12 +116,12 @@ func (suite *TestSuite) Test_GraphQL_Query() { }`, queryVariables: nil, }, - wantResult: `{"tbl_bots":[{"bot_name":"littleMentionBot"}]}`, + wantResult: `{"tbl_bots":[{"bot_name":"ThetaGuardianBot"}]}`, wantErr: false, }, { name: "Invalid query", - endpoint: "http://hasura.local/v1/graphql", + endpoint: "https://hasura.local/v1/graphql", isLocal: true, args: args{ queryContent: `query listUserBots {