test
This commit is contained in:
		
							parent
							
								
									46c6f2423b
								
							
						
					
					
						commit
						ec8e8e4bb6
					
				|  | @ -71,8 +71,7 @@ func TestQuery(t *testing.T) { | |||
| 		fmt.Println("order: not found in the string") | ||||
| 		return | ||||
| 	} | ||||
| 	trimmedResult := requestString[index+len("order:"):] | ||||
| 	fmt.Println(trimmedResult) | ||||
| 	fmt.Println(requestString[index+len("order:"):]) | ||||
| 
 | ||||
| 	t.Run("TestQuery", func(t *testing.T) { | ||||
| 		got, err := zltx.Query(context.Background(), request) | ||||
|  | @ -82,16 +81,12 @@ func TestQuery(t *testing.T) { | |||
| 		} | ||||
| 		result := got.String() | ||||
| 		fmt.Printf("%+v \n", got) | ||||
| 		fmt.Printf("%s \n", got.Result.String()) | ||||
| 
 | ||||
| 		index := strings.Index(result, "result:") | ||||
| 		index = strings.Index(result, "result:") | ||||
| 		if index == -1 { | ||||
| 			fmt.Println("result: not found in the string") | ||||
| 			return | ||||
| 		} | ||||
| 		// 截取 result: 后面的部分
 | ||||
| 		trimmedResult := result[index+len("result:"):] | ||||
| 		fmt.Println(trimmedResult) | ||||
| 		fmt.Println(result[index+len("result:"):]) | ||||
| 
 | ||||
| 		assert.Equal(t, int(proto.Status_SUCCESS), int(got.Result.Status)) | ||||
| 	}) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue