Merge pull request #2934 from andyfowler/vagrant_do_post_processor_fix_pr_fixup

Make DigitalOcean artifact ID match AWS format (fixed)
This commit is contained in:
Mark Peek 2015-11-12 10:20:49 -08:00
commit 09a07b5545
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ func (*Artifact) Files() []string {
}
func (a *Artifact) Id() string {
return strconv.FormatUint(uint64(a.snapshotId), 10)
return fmt.Sprintf("%s:%s", a.regionName, strconv.FormatUint(uint64(a.snapshotId), 10))
}
func (a *Artifact) String() string {

View File

@ -16,7 +16,7 @@ func TestArtifact_Impl(t *testing.T) {
func TestArtifactId(t *testing.T) {
a := &Artifact{"packer-foobar", 42, "San Francisco", nil}
expected := "42"
expected := "San Francisco:42"
if a.Id() != expected {
t.Fatalf("artifact ID should match: %v", expected)