Browse Source

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

Brian Waldon 11 years ago
parent
commit
32ff3ce26f
1 changed files with 8 additions and 0 deletions
  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 {