Explorar o código

integration: test sort ASCEND by default in range

Gyu-Ho Lee %!s(int64=9) %!d(string=hai) anos
pai
achega
f550af7ef4
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      integration/v3_grpc_test.go

+ 8 - 1
integration/v3_grpc_test.go

@@ -858,6 +858,12 @@ func TestV3RangeRequest(t *testing.T) {
 					SortOrder:  pb.RangeRequest_DESCEND,
 					SortTarget: pb.RangeRequest_CREATE,
 				},
+				{ // sort ASCEND by default
+					Key: []byte("a"), RangeEnd: []byte("z"),
+					Limit:      10,
+					SortOrder:  pb.RangeRequest_NONE,
+					SortTarget: pb.RangeRequest_CREATE,
+				},
 			},
 
 			[][]string{
@@ -866,8 +872,9 @@ func TestV3RangeRequest(t *testing.T) {
 				{"b"},
 				{"c"},
 				{},
+				{"b", "a", "c", "d"},
 			},
-			[]bool{true, true, true, true, false},
+			[]bool{true, true, true, true, false, false},
 		},
 		// min/max mod rev
 		{