mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Svc REST: Remove redundant Get test
This commit is contained in:
parent
15c513cc36
commit
6d640aa244
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user