Documentation ¶
Overview ¶
Package testutils provides some simple ease-of-use tools for implementing acceptance testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupFiles ¶
func CleanupFiles(moreFiles ...string)
CleanupFiles removes all the provided filenames.
func FileExists ¶
FileExists returns true if the filename is found.
Types ¶
type ManifestArtifact ¶ added in v0.1.4
type ManifestArtifact struct { BuildName string `json:"name"` BuilderType string `json:"builder_type"` BuildTime int64 `json:"build_time,omitempty"` ArtifactFiles []ManifestArtifactFile `json:"files"` ArtifactId string `json:"artifact_id"` PackerRunUUID string `json:"packer_run_uuid"` CustomData map[string]string `json:"custom_data"` }
type ManifestArtifactFile ¶ added in v0.1.4
type ManifestFile ¶ added in v0.1.4
type ManifestFile struct { Builds []ManifestArtifact `json:"builds"` LastRunUUID string `json:"last_run_uuid"` }
"A little copying is better than a lot of dependecy" This code comes from the manifest post-processor shipped with Packer core. These structs allow us to re-decode the manifest
func GetArtifact ¶ added in v0.1.4
func GetArtifact(manifestfilepath string) (ManifestFile, error)
Use the manifest to load information about artifact ID and region. to properly use this, you should make sure the manifestfilepath is unique for each test, and remember to clean up the manifest file when your build is done!
Click to show internal directories.
Click to hide internal directories.