Skip to content

Commit

Permalink
Add missing method to Daemon mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
moncho committed Apr 24, 2017
1 parent 0c808ec commit 73e02f4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
File renamed without changes.
5 changes: 5 additions & 0 deletions mocks/docker_daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ func (_m *DockerDaemonMock) RemoveNetwork(id string) error {
return nil
}

//Services mock
func (_m *DockerDaemonMock) Services() ([]swarm.Service, error) {
return nil, nil
}

// StopContainer provides a mock function with given fields: id
func (_m *DockerDaemonMock) StopContainer(id string) error {
return nil
Expand Down
6 changes: 6 additions & 0 deletions mocks/docker_swarmDaemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ func (_m *SwarmDockerDaemon) Nodes() ([]swarm.Node, error) {
return []swarm.Node{swarm.Node{ID: "1"}}, nil
}

//Services returns a list of services with 1 element
func (_m *SwarmDockerDaemon) Services() ([]swarm.Service, error) {
return []swarm.Service{
swarm.Service{ID: "ServiceID"}}, nil
}

//Tasks mock
func (_m *SwarmDockerDaemon) Tasks(nodeID string) ([]swarm.Task, error) {
return []swarm.Task{swarm.Task{NodeID: nodeID}}, nil
Expand Down

0 comments on commit 73e02f4

Please sign in to comment.