blob: df3d8775e0b877ad2dfbe981fb64153633b422ca [file] [log] [blame]
package gophercloud
import (
"testing"
)
func TestProviderRegistry(t *testing.T) {
c := TestContext()
_, err := c.ProviderByName("aProvider")
if err == nil {
t.Error("Expected error when looking for a provider by non-existant name")
return
}
_ = c.RegisterProvider("aProvider", &Provider{})
_, err = c.ProviderByName("aProvider")
if err != nil {
t.Error(err)
return
}
}