mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 20:57:20 +00:00
Improve pkg/registry/service code coverage.
This commit is contained in:
@@ -32,6 +32,7 @@ type ServiceRegistry struct {
|
||||
|
||||
DeletedID string
|
||||
GottenID string
|
||||
UpdatedID string
|
||||
}
|
||||
|
||||
func (r *ServiceRegistry) ListServices() (api.ServiceList, error) {
|
||||
@@ -40,6 +41,7 @@ func (r *ServiceRegistry) ListServices() (api.ServiceList, error) {
|
||||
|
||||
func (r *ServiceRegistry) CreateService(svc api.Service) error {
|
||||
r.Service = &svc
|
||||
r.List.Items = append(r.List.Items, svc)
|
||||
return r.Err
|
||||
}
|
||||
|
||||
@@ -54,6 +56,7 @@ func (r *ServiceRegistry) DeleteService(id string) error {
|
||||
}
|
||||
|
||||
func (r *ServiceRegistry) UpdateService(svc api.Service) error {
|
||||
r.UpdatedID = svc.ID
|
||||
return r.Err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user