Parcourir la source

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

Brian Waldon il y a 11 ans
Parent
commit
32ff3ce26f
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  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 {