Prechádzať zdrojové kódy

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

Brian Waldon 11 rokov pred
rodič
commit
32ff3ce26f
1 zmenil súbory, kde vykonal 8 pridanie a 0 odobranie
  1. 8 0
      client/keys_test.go

+ 8 - 0
client/keys_test.go

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