mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
client: test assertStatusCode
This commit is contained in:
parent
549c643bfe
commit
052521eaf1
@ -83,3 +83,13 @@ func TestMembersAPIActionRemove(t *testing.T) {
|
||||
t.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
func TestAssertStatusCode(t *testing.T) {
|
||||
if err := assertStatusCode(400, 404); err == nil {
|
||||
t.Errorf("assertStatusCode failed to detect conflict in 400 vs 404")
|
||||
}
|
||||
|
||||
if err := assertStatusCode(400, 400); err != nil {
|
||||
t.Errorf("assertStatusCode found conflict in 400 vs 400: %v", err)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user