mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-22 09:20:22 -05:00
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.
23 lines
383 B
Go
23 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")
|
|
}
|
|
}
|