Skip to content

Commit

Permalink
Merge pull request juju#12167 from benhoyt/fix-provider-common
Browse files Browse the repository at this point in the history
juju#12167

Simple fix for test failures I was seeing locally with `provider/common` package. I home the juju repo checked out at `~/w/juju`, but it seems the tests expect it at `*/juju/juju` (probably most people have it at `~/go/src/github.com/juju/juju`?). Was probably happening only to me (and I guess I've never run the entire unit tests suite locally! I usually run by subdirectory or package).

Either way, the tests shouldn't depend on the checkout directory, so loosen up this regex a bit.
  • Loading branch information
jujubot committed Oct 21, 2020
2 parents 6583134 + b8d405e commit 276b680
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions provider/common/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ func (*ErrorsSuite) TestWrapZoneIndependentError(c *gc.C) {

stack := errors.ErrorStack(wrapped)
c.Assert(stack, gc.Matches, `
.*/juju/juju/provider/common/errors_test.go:.*: foo
.*/juju/juju/provider/common/errors_test.go:.*: bar
.*/juju/juju/provider/common/errors_test.go:.*: bar: foo`[1:])
.*/provider/common/errors_test.go:.*: foo
.*/provider/common/errors_test.go:.*: bar
.*/provider/common/errors_test.go:.*: bar: foo`[1:])
}

func (s *ErrorsSuite) TestInvalidCredentialWrapped(c *gc.C) {
Expand All @@ -46,9 +46,9 @@ func (s *ErrorsSuite) TestInvalidCredentialWrapped(c *gc.C) {

stack := errors.ErrorStack(err)
c.Assert(stack, gc.Matches, `
.*/juju/juju/provider/common/errors_test.go:.*: foo
.*/juju/juju/provider/common/errors_test.go:.*: bar
.*/juju/juju/provider/common/errors_test.go:.*: bar: foo`[1:])
.*/provider/common/errors_test.go:.*: foo
.*/provider/common/errors_test.go:.*: bar
.*/provider/common/errors_test.go:.*: bar: foo`[1:])
}

func (s *ErrorsSuite) TestInvalidCredentialNew(c *gc.C) {
Expand Down

0 comments on commit 276b680

Please sign in to comment.