~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/tools/lxdclient/testing_test.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
import (
9
9
        "crypto/x509"
10
 
        "os"
11
10
 
12
11
        "github.com/juju/errors"
13
12
        "github.com/juju/testing"
108
107
        return s.Response, nil
109
108
}
110
109
 
111
 
func (s *stubClient) Action(name string, action shared.ContainerAction, timeout int, force bool) (*lxd.Response, error) {
112
 
        s.stub.AddCall("Action", name, action, timeout, force)
 
110
func (s *stubClient) Action(name string, action shared.ContainerAction, timeout int, force bool, stateful bool) (*lxd.Response, error) {
 
111
        s.stub.AddCall("Action", name, action, timeout, force, stateful)
113
112
        if err := s.stub.NextErr(); err != nil {
114
113
                return nil, errors.Trace(err)
115
114
        }
117
116
        return s.Response, nil
118
117
}
119
118
 
120
 
func (s *stubClient) Exec(name string, cmd []string, env map[string]string, stdin *os.File, stdout *os.File, stderr *os.File) (int, error) {
121
 
        s.stub.AddCall("Exec", name, cmd, env, stdin, stdout, stderr)
122
 
        if err := s.stub.NextErr(); err != nil {
123
 
                return -1, errors.Trace(err)
124
 
        }
125
 
 
126
 
        return s.ReturnCode, nil
127
 
}
128
 
 
129
119
func (s *stubClient) SetContainerConfig(name, key, value string) error {
130
120
        s.stub.AddCall("SetContainerConfig", name, key, value)
131
121
        if err := s.stub.NextErr(); err != nil {