mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 13:12:20 +00:00
Make tests pass again
This commit is contained in:
@@ -35,11 +35,11 @@ func (r *ControllerRegistry) GetController(ID string) (*api.ReplicationControlle
|
||||
return &api.ReplicationController{}, r.Err
|
||||
}
|
||||
|
||||
func (r *ControllerRegistry) CreateController(controller api.ReplicationController) error {
|
||||
func (r *ControllerRegistry) CreateController(controller *api.ReplicationController) error {
|
||||
return r.Err
|
||||
}
|
||||
|
||||
func (r *ControllerRegistry) UpdateController(controller api.ReplicationController) error {
|
||||
func (r *ControllerRegistry) UpdateController(controller *api.ReplicationController) error {
|
||||
return r.Err
|
||||
}
|
||||
|
||||
|
@@ -68,19 +68,19 @@ func (r *PodRegistry) GetPod(podId string) (*api.Pod, error) {
|
||||
return r.Pod, r.Err
|
||||
}
|
||||
|
||||
func (r *PodRegistry) CreatePod(pod api.Pod) error {
|
||||
func (r *PodRegistry) CreatePod(pod *api.Pod) error {
|
||||
r.Lock()
|
||||
defer r.Unlock()
|
||||
r.Pod = &pod
|
||||
r.mux.Action(watch.Added, &pod)
|
||||
r.Pod = pod
|
||||
r.mux.Action(watch.Added, pod)
|
||||
return r.Err
|
||||
}
|
||||
|
||||
func (r *PodRegistry) UpdatePod(pod api.Pod) error {
|
||||
func (r *PodRegistry) UpdatePod(pod *api.Pod) error {
|
||||
r.Lock()
|
||||
defer r.Unlock()
|
||||
r.Pod = &pod
|
||||
r.mux.Action(watch.Modified, &pod)
|
||||
r.Pod = pod
|
||||
r.mux.Action(watch.Modified, pod)
|
||||
return r.Err
|
||||
}
|
||||
|
||||
|
@@ -42,9 +42,9 @@ func (r *ServiceRegistry) ListServices() (*api.ServiceList, error) {
|
||||
return &r.List, r.Err
|
||||
}
|
||||
|
||||
func (r *ServiceRegistry) CreateService(svc api.Service) error {
|
||||
r.Service = &svc
|
||||
r.List.Items = append(r.List.Items, svc)
|
||||
func (r *ServiceRegistry) CreateService(svc *api.Service) error {
|
||||
r.Service = svc
|
||||
r.List.Items = append(r.List.Items, *svc)
|
||||
return r.Err
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ func (r *ServiceRegistry) DeleteService(id string) error {
|
||||
return r.Err
|
||||
}
|
||||
|
||||
func (r *ServiceRegistry) UpdateService(svc api.Service) error {
|
||||
func (r *ServiceRegistry) UpdateService(svc *api.Service) error {
|
||||
r.UpdatedID = svc.ID
|
||||
return r.Err
|
||||
}
|
||||
@@ -76,8 +76,8 @@ func (r *ServiceRegistry) GetEndpoints(id string) (*api.Endpoints, error) {
|
||||
return &r.Endpoints, r.Err
|
||||
}
|
||||
|
||||
func (r *ServiceRegistry) UpdateEndpoints(e api.Endpoints) error {
|
||||
r.Endpoints = e
|
||||
func (r *ServiceRegistry) UpdateEndpoints(e *api.Endpoints) error {
|
||||
r.Endpoints = *e
|
||||
return r.Err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user