~ubuntu-branches/ubuntu/vivid/juju-core/vivid-proposed

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/provider/ec2/init_test.go

  • Committer: Package Import Robot
  • Author(s): Curtis C. Hovey
  • Date: 2015-09-29 19:43:29 UTC
  • mfrom: (47.1.4 wily-proposed)
  • Revision ID: package-import@ubuntu.com-20150929194329-9y496tbic30hc7vp
Tags: 1.24.6-0ubuntu1~15.04.1
Backport of 1.24.6 from wily. (LP: #1500916, #1497087)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
}