blob: df3d8775e0b877ad2dfbe981fb64153633b422ca [file] [log] [blame]
Samuel A. Falvo IIfd78c302013-06-25 16:35:32 -07001package gophercloud
2
3import (
4 "testing"
5)
6
7func TestProviderRegistry(t *testing.T) {
8 c := TestContext()
9
10 _, err := c.ProviderByName("aProvider")
11 if err == nil {
12 t.Error("Expected error when looking for a provider by non-existant name")
13 return
14 }
15
16 _ = c.RegisterProvider("aProvider", &Provider{})
17 _, err = c.ProviderByName("aProvider")
18 if err != nil {
19 t.Error(err)
20 return
21 }
22}