Skip to content

Commit

Permalink
Update GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiee committed Sep 30, 2021
1 parent 40682a4 commit b153646
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@ jobs:
- name: Test with GO test
run: |
pushd nebula-docker-compose/
docker-compose up -d
enable_ssl=false docker-compose up -d
sleep 10
popd
go test -v -race
- name: Test SSL connection
run: |
pushd nebula-docker-compose/
enable_ssl=true docker-compose up -d
sleep 10
popd
go test -v -run TestSSLConnection
- name: Run examples
run: |
go run basic_example/graph_client_basic_example.go
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build test fmt ci run-examples
.PHONY: build test fmt ci ssl-test run-examples

default: build

Expand All @@ -20,6 +20,13 @@ ci:
go test -v -race; \
cd ./nebula-docker-compose && docker-compose down -v

ssl-test:
cd ./nebula-docker-compose && enable_ssl=true docker-compose up -d && \
sleep 5 && \
cd .. && \
go test -v -run TestSSLConnection; \
cd ./nebula-docker-compose && docker-compose down -v

run-examples:
go run basic_example/graph_client_basic_example.go
go run gorountines_example/graph_client_goroutines_example.go
4 changes: 0 additions & 4 deletions nebula-docker-compose/ssl.env

This file was deleted.

6 changes: 3 additions & 3 deletions ssl_connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,21 @@ func TestSSLConnection(t *testing.T) {
t.Fatalf(err.Error())
return
}
checkResSetResp(t, "show hosts", resp)
checkResultSet(t, "show hosts", resp)
// Create a new space
resp, err = tryToExecute(session, "CREATE SPACE client_test(partition_num=1024, replica_factor=1, vid_type = FIXED_STRING(30));")
if err != nil {
t.Fatalf(err.Error())
return
}
checkResSetResp(t, "create space", resp)
checkResultSet(t, "create space", resp)

resp, err = tryToExecute(session, "DROP SPACE client_test;")
if err != nil {
t.Fatalf(err.Error())
return
}
checkResSetResp(t, "drop space", resp)
checkResultSet(t, "drop space", resp)
}

func openAndReadFile(t *testing.T, path string) []byte {
Expand Down

0 comments on commit b153646

Please sign in to comment.