~sinzui/ubuntu/wily/juju-core/wily-1.24.7

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/api/agent/machine_test.go

  • Committer: Package Import Robot
  • Author(s): Curtis C. Hovey
  • Date: 2015-09-22 15:27:01 UTC
  • mfrom: (1.1.36)
  • Revision ID: package-import@ubuntu.com-20150922152701-lzq2yhn2uaahrdqu
Tags: 1.24.6-0ubuntu1
* New upstream release (LP: #1481556).
* d/copyright updated for Juju 1.24.6 (Last verified commit changes).
* d/tests/* Run tests with upstart when Juju version before 1.23.
* Prefer gccgo-5 for ppc64el and arm64 in build-deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
        c.Assert(err, jc.ErrorIsNil)
150
150
        info.Tag = tag
151
151
        info.Password = "foo-12345678901234567890"
152
 
        err = tryOpenState(info)
153
 
        c.Assert(err, jc.Satisfies, errors.IsUnauthorized)
 
152
        err = tryOpenState(s.State.EnvironTag(), info)
 
153
        c.Assert(errors.Cause(err), jc.Satisfies, errors.IsUnauthorized)
154
154
}
155
155
 
156
156
func (s *machineSuite) TestClearReboot(c *gc.C) {
171
171
        c.Assert(rFlag, jc.IsFalse)
172
172
}
173
173
 
174
 
func tryOpenState(info *mongo.MongoInfo) error {
175
 
        st, err := state.Open(info, mongo.DialOpts{}, environs.NewStatePolicy())
 
174
func tryOpenState(envTag names.EnvironTag, info *mongo.MongoInfo) error {
 
175
        st, err := state.Open(envTag, info, mongo.DefaultDialOpts(), environs.NewStatePolicy())
176
176
        if err == nil {
177
177
                st.Close()
178
178
        }