Skip to content

Commit 706ffcd

Browse files
authored
Merge pull request #111 from tarantool/105-fix-tests
Fix duplicate key test case
2 parents 61f3a41 + c806e1c commit 706ffcd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
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]]

tarantool_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ func TestClient(t *testing.T) {
439439
t.Errorf("Expected ErrTupleFound but got: %v", err)
440440
}
441441
if len(resp.Data) != 0 {
442-
t.Errorf("Response Body len != 1")
442+
t.Errorf("Response Body len != 0")
443443
}
444444

445445
// Delete

0 commit comments

Comments
 (0)