mirror of https://github.com/hashicorp/packer
parent
d4c400aa71
commit
01eff9472a
@ -1,24 +0,0 @@
|
||||
//go:generate struct-markdown
|
||||
|
||||
package common
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/packer/template/interpolate"
|
||||
)
|
||||
|
||||
type ExportOpts struct {
|
||||
// Additional options to pass to the
|
||||
// VBoxManage
|
||||
// export. This
|
||||
// can be useful for passing product information to include in the resulting
|
||||
// appliance file. Packer JSON configuration file example:
|
||||
ExportOpts []string `mapstructure:"export_opts" required:"false"`
|
||||
}
|
||||
|
||||
func (c *ExportOpts) Prepare(ctx *interpolate.Context) []error {
|
||||
if c.ExportOpts == nil {
|
||||
c.ExportOpts = make([]string, 0)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/packer/template/interpolate"
|
||||
)
|
||||
|
||||
func TestExportOptsPrepare_BootWait(t *testing.T) {
|
||||
var c *ExportOpts
|
||||
var errs []error
|
||||
|
||||
// Good
|
||||
c = new(ExportOpts)
|
||||
c.ExportOpts = []string{
|
||||
"--options",
|
||||
}
|
||||
errs = c.Prepare(interpolate.NewContext())
|
||||
if len(errs) > 0 {
|
||||
t.Fatalf("should not have error: %s", errs)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue