github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/provider/ec2/init_test.go (about) 1 // Copyright 2015 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package ec2_test 5 6 import ( 7 jc "github.com/juju/testing/checkers" 8 gc "gopkg.in/check.v1" 9 10 "github.com/juju/juju/provider/ec2" 11 "github.com/juju/juju/storage" 12 "github.com/juju/juju/storage/provider/registry" 13 "github.com/juju/juju/testing" 14 ) 15 16 type providerSuite struct { 17 testing.BaseSuite 18 } 19 20 var _ = gc.Suite(&providerSuite{}) 21 22 func (*providerSuite) TestEBSProviderRegistered(c *gc.C) { 23 p, err := registry.StorageProvider(ec2.EBS_ProviderType) 24 c.Assert(err, jc.ErrorIsNil) 25 _, ok := p.(storage.Provider) 26 c.Assert(ok, jc.IsTrue) 27 } 28 29 func (*providerSuite) TestSupportedProviders(c *gc.C) { 30 supported := []storage.ProviderType{ec2.EBS_ProviderType} 31 for _, providerType := range supported { 32 ok := registry.IsProviderSupported("ec2", providerType) 33 c.Assert(ok, jc.IsTrue) 34 } 35 }