github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/worker/uniter/runner/jujuc/errors_test.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package jujuc_test 5 6 import ( 7 jc "github.com/juju/testing/checkers" 8 gc "gopkg.in/check.v1" 9 10 "github.com/juju/juju/testing" 11 "github.com/juju/juju/worker/uniter/runner/jujuc" 12 ) 13 14 type ErrorsSuite struct { 15 testing.BaseSuite 16 } 17 18 var _ = gc.Suite(&ErrorsSuite{}) 19 20 func (t *ErrorsSuite) TestNotAvailableErr(c *gc.C) { 21 err := jujuc.NotAvailable("the thing") 22 c.Assert(err, gc.ErrorMatches, "the thing is not available") 23 c.Assert(jujuc.IsNotAvailable(err), jc.IsTrue) 24 }