Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add console retry in the action #183

Merged
merged 4 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ jobs:
- name: Test SSL connection with CA
run: |
make up-ssl
sleep 10
make ssl-test
- name: Test SSL connection self-signed
run: |
make up-ssl
sleep 10
make ssl-test-self-signed
- name: down
if: always()
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ up:
cd ./nebula-docker-compose && docker-compose up -d

up-ssl:
cd ./nebula-docker-compose && enable_ssl=true docker-compose up -d
cd ./nebula-docker-compose && enable_ssl=true docker-compose -f docker-compose-ssl.yaml up -d

down:
cd ./nebula-docker-compose && docker-compose down -v
Expand All @@ -25,9 +25,6 @@ ssl-test:
ssl_test=true go test -v -run TestSslConnection;

ssl-test-self-signed:
cd ./nebula-docker-compose && enable_ssl=true docker-compose up -d && \
sleep 10 && \
cd .. && \
self_signed=true go test -v -run TestSslConnection;

run-examples:
Expand Down
12 changes: 6 additions & 6 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func TestAuthentication(t *testing.T) {
defer conn.close()

_, authErr := conn.authenticate(username, password)
assert.EqualError(t, authErr, "fail to authenticate, error: Bad username/password")
assert.EqualError(t, authErr, "fail to authenticate, error: User not exist")
}

func TestInvalidHostTimeout(t *testing.T) {
Expand Down Expand Up @@ -369,7 +369,7 @@ func TestServiceDataIO(t *testing.T) {
return
}
assert.Equal(t,
"(\"Bob\" :student{interval: P12M0DT0S, name: \"Bob\"} "+
"(\"Bob\" :student{interval: P1MT100.000020000S, name: \"Bob\"} "+
":person{age: 10, birthday: 2010-09-10T10:08:02.000000, book_num: 100, "+
"child_name: \"Hello Worl\", expend: 100.0, "+
"first_out_city: 1111, friends: 10, grade: 3, "+
Expand Down Expand Up @@ -929,7 +929,7 @@ func TestExecuteJson(t *testing.T) {
"person.property": float64(1000),
"person.start_school": `2017-09-10`,
"student.name": "Bob",
"student.interval": `P12M0DT0S`,
"student.interval": `P1MT100.000020000S`,
},
}

Expand Down Expand Up @@ -1066,7 +1066,7 @@ func TestExecuteWithParameter(t *testing.T) {
}
// Complex result
{
resp, err := tryToExecuteWithParameter(session, "MATCH (v:person {name: $p4.b}) WHERE v.age>$p2-3 and $p1==true RETURN v ORDER BY $p3[0] LIMIT $p2", params)
resp, err := tryToExecuteWithParameter(session, "MATCH (v:person {name: $p4.b}) WHERE v.person.age>$p2-3 and $p1==true RETURN v ORDER BY $p3[0] LIMIT $p2", params)
if err != nil {
t.Fatalf(err.Error())
return
Expand All @@ -1088,7 +1088,7 @@ func TestExecuteWithParameter(t *testing.T) {
return
}
assert.Equal(t,
"(\"Bob\" :student{interval: P12M0DT0S, name: \"Bob\"} "+
"(\"Bob\" :student{interval: P1MT100.000020000S, name: \"Bob\"} "+
":person{age: 10, birthday: 2010-09-10T10:08:02.000000, book_num: 100, "+
"child_name: \"Hello Worl\", expend: 100.0, "+
"first_out_city: 1111, friends: 10, grade: 3, "+
Expand Down Expand Up @@ -1275,7 +1275,7 @@ func loadTestData(t *testing.T, session *Session) {

query =
"INSERT VERTEX student(name, interval) VALUES " +
"'Bob':('Bob', duration({years: 1, seconds: 0})), 'Lily':('Lily', duration({years: 1, seconds: 0})), " +
"'Bob':('Bob', duration({months:1, seconds:100, microseconds:20})), 'Lily':('Lily', duration({years: 1, seconds: 0})), " +
"'Tom':('Tom', duration({years: 1, seconds: 0})), 'Jerry':('Jerry', duration({years: 1, seconds: 0})), 'John':('John', duration({years: 1, seconds: 0}))"
resultSet, err = tryToExecute(session, query)
if err != nil {
Expand Down
Loading