Browse Source

client: test for non-integer X-Etcd-Index

Brian Waldon 11 năm trước cách đây
mục cha
commit
32ff3ce26f
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      client/keys_test.go

+ 8 - 0
client/keys_test.go

@@ -560,6 +560,14 @@ func TestUnmarshalSuccessfulResponse(t *testing.T) {
 			wantRes: nil,
 			wantErr: true,
 		},
+
+		// non-integer index
+		{
+			hdr:     "poo",
+			body:    `{}`,
+			wantRes: nil,
+			wantErr: true,
+		},
 	}
 
 	for i, tt := range tests {