Skip to content

Commit b50fcb1

Browse files
Make test case consistent with comments
Original test case had failed with Tarantool 2.8.1 or newer due to error message rework [1]. Based on code comments and @funny-falcon response in #105, the test has been planned to be success insert test and not a duplicate key error test. This patch changes test case and asserts to its original idea. Since duplicate key test already exists in tarantool_test.go file [2], coverage should not decrease. 1. tarantool/tarantool@d11fb30 2. https://github.com/tarantool/go-tarantool/blob/61f3a41907b6bcb060e9fa07069cde5b33ba9764/tarantool_test.go#L437-L443 Closes #105
1 parent 61f3a41 commit b50fcb1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

example_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func Example() {
119119
fmt.Println("Insert Data", resp.Data)
120120

121121
// insert new tuple { 11, 1 }
122-
resp, err = client.Insert("test", &Tuple{Id: 10, Msg: "test", Name: "one"})
122+
resp, err = client.Insert("test", &Tuple{Id: 11, Msg: "test", Name: "one"})
123123
fmt.Println("Insert Error", err)
124124
fmt.Println("Insert Code", resp.Code)
125125
fmt.Println("Insert Data", resp.Data)
@@ -194,9 +194,9 @@ func Example() {
194194
// Insert Error <nil>
195195
// Insert Code 0
196196
// Insert Data [[10 test one]]
197-
// Insert Error Duplicate key exists in unique index 'primary' in space 'test' (0x3)
198-
// Insert Code 3
199-
// Insert Data []
197+
// Insert Error <nil>
198+
// Insert Code 0
199+
// Insert Data [[11 test one]]
200200
// Delete Error <nil>
201201
// Delete Code 0
202202
// Delete Data [[10 test one]]

0 commit comments

Comments
 (0)