4b7da04052
This change adds base support for an openstack builder. Thank you to Rackspace for providing cloud assets to complete this work and @sam-falvo for working with us on the perigee/gophercloud changes.
24 lines
383 B
Go
24 lines
383 B
Go
package openstack
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func testImageConfig() *ImageConfig {
|
|
return &ImageConfig{
|
|
ImageName: "foo",
|
|
}
|
|
}
|
|
|
|
func TestImageConfigPrepare_Region(t *testing.T) {
|
|
c := testImageConfig()
|
|
if err := c.Prepare(nil); err != nil {
|
|
t.Fatalf("shouldn't have err: %s", err)
|
|
}
|
|
|
|
c.ImageName = ""
|
|
if err := c.Prepare(nil); err == nil {
|
|
t.Fatal("should have error")
|
|
}
|
|
}
|