Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyatomohiro committed Apr 18, 2024
1 parent 86b8e0a commit 7fa51c1
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions server/e2e/gql_nlslayer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,19 +780,23 @@ func addCustomProperties(
return requestBody, res
}

func TestCustomProperties(t *testing.T) {
mr, err := miniredis.Run()
if err != nil {
t.Fatal(err)
func customProperties(t *testing.T, isUseRedis bool) {
redisAddress := ""
if isUseRedis {
mr, err := miniredis.Run()
if err != nil {
t.Fatal(err)
}
defer mr.Close()
redisAddress = mr.Addr()
}
defer mr.Close()

e := StartServer(t, &config.Config{
Origins: []string{"https://example.com"},
AuthSrv: config.AuthSrvConfig{
Disabled: true,
},
RedisHost: mr.Addr(),
RedisHost: redisAddress,
}, true, baseSeeder)

pId := createProject(e)
Expand Down Expand Up @@ -862,3 +866,11 @@ func TestCustomProperties(t *testing.T) {
Value("customPropertySchema").Object().
Value("extrudedHeight").Equal(10)
}

func TestCustomProperties(t *testing.T) {
customProperties(t, false)
}

func TestCustomPropertiesWithRedis(t *testing.T) {
customProperties(t, true)
}

0 comments on commit 7fa51c1

Please sign in to comment.