Svc REST: Remove redundant Get test

This commit is contained in:
Tim Hockin 2021-07-11 11:14:16 -07:00
parent 15c513cc36
commit 6d640aa244

View File

@ -848,21 +848,6 @@ func TestServiceRegistryUpdateMultiPortLoadBalancerService(t *testing.T) {
}
}
func TestServiceRegistryGet(t *testing.T) {
ctx := genericapirequest.NewDefaultContext()
storage, server := NewTestREST(t, []api.IPFamily{api.IPv4Protocol})
defer server.Terminate(t)
_, err := storage.Create(ctx, svctest.MakeService("foo"), rest.ValidateAllObjectFunc, &metav1.CreateOptions{})
if err != nil {
t.Fatalf("error creating service: %v", err)
}
obj, _ := storage.Get(ctx, "foo", &metav1.GetOptions{})
svc := obj.(*api.Service)
if e, a := "foo", svc.Name; e != a {
t.Errorf("Expected %v, but got %v", e, a)
}
}
// this is local because it's not fully fleshed out enough for general use.
func makePod(name string, ips ...string) api.Pod {
p := api.Pod{