Make tests pass again

This commit is contained in:
Daniel Smith
2014-09-07 21:14:18 -07:00
parent 48ce23ac91
commit fc09f988b4
30 changed files with 270 additions and 228 deletions

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
}