github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/testing/environ_test.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package testing_test 5 6 import ( 7 "github.com/juju/names/v5" 8 jc "github.com/juju/testing/checkers" 9 "github.com/juju/utils/v3" 10 gc "gopkg.in/check.v1" 11 12 "github.com/juju/juju/testing" 13 ) 14 15 type fakeHomeSuite struct { 16 testing.FakeJujuXDGDataHomeSuite 17 } 18 19 var _ = gc.Suite(&fakeHomeSuite{}) 20 21 func (s *fakeHomeSuite) TestModelTagValid(c *gc.C) { 22 asString := testing.ModelTag.String() 23 tag, err := names.ParseModelTag(asString) 24 c.Assert(err, jc.ErrorIsNil) 25 c.Assert(tag, gc.Equals, testing.ModelTag) 26 } 27 28 func (s *fakeHomeSuite) TestModelUUIDValid(c *gc.C) { 29 c.Assert(utils.IsValidUUIDString(testing.ModelTag.Id()), jc.IsTrue) 30 }