github.com/Pankov404/juju@v0.0.0-20150703034450-be266991dceb/worker/uniter/runner/jujuc/storage_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 gc "gopkg.in/check.v1" 8 9 jujuctesting "github.com/juju/juju/worker/uniter/runner/jujuc/testing" 10 ) 11 12 var ( 13 storageAttributes = map[string]interface{}{ 14 "location": "/dev/sda", 15 "kind": "block", 16 } 17 ) 18 19 type storageSuite struct { 20 ContextSuite 21 22 storageName string 23 location string 24 } 25 26 func (s *storageSuite) SetUpTest(c *gc.C) { 27 s.ContextSuite.SetUpTest(c) 28 29 s.storageName = "data/0" 30 s.location = "/dev/sda" 31 } 32 33 func (s *storageSuite) newHookContext() (*jujuctesting.Context, *jujuctesting.ContextInfo) { 34 hctx, info := s.NewHookContext() 35 info.SetBlockStorage(s.storageName, s.location, s.Stub) 36 info.SetStorageTag(s.storageName) 37 return hctx, info 38 }