Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
3c59d0ef
Commit
3c59d0ef
authored
Mar 07, 2014
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/vmware/common: fix failing tests on Windows
parent
68524a38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
builder/vmware/common/step_shutdown.go
builder/vmware/common/step_shutdown.go
+4
-1
builder/vmware/common/step_shutdown_test.go
builder/vmware/common/step_shutdown_test.go
+2
-0
No files found.
builder/vmware/common/step_shutdown.go
View file @
3c59d0ef
...
...
@@ -28,6 +28,9 @@ import (
type
StepShutdown
struct
{
Command
string
Timeout
time
.
Duration
// Set this to true if we're testing
Testing
bool
}
func
(
s
*
StepShutdown
)
Run
(
state
multistep
.
StateBag
)
multistep
.
StepAction
{
...
...
@@ -134,7 +137,7 @@ LockWaitLoop:
}
}
if
runtime
.
GOOS
==
"windows"
{
if
runtime
.
GOOS
==
"windows"
&&
!
s
.
Testing
{
// Windows takes a while to yield control of the files when the
// process is exiting. We just sleep here. In the future, it'd be
// nice to find a better solution to this.
...
...
builder/vmware/common/step_shutdown_test.go
View file @
3c59d0ef
...
...
@@ -33,6 +33,7 @@ func TestStepShutdown_command(t *testing.T) {
step
:=
new
(
StepShutdown
)
step
.
Command
=
"foo"
step
.
Timeout
=
10
*
time
.
Second
step
.
Testing
=
true
comm
:=
state
.
Get
(
"communicator"
)
.
(
*
packer
.
MockCommunicator
)
driver
:=
state
.
Get
(
"driver"
)
.
(
*
DriverMock
)
...
...
@@ -116,6 +117,7 @@ func TestStepShutdown_noCommand(t *testing.T) {
func
TestStepShutdown_locks
(
t
*
testing
.
T
)
{
state
:=
testStepShutdownState
(
t
)
step
:=
new
(
StepShutdown
)
step
.
Testing
=
true
dir
:=
state
.
Get
(
"dir"
)
.
(
*
LocalOutputDir
)
comm
:=
state
.
Get
(
"communicator"
)
.
(
*
packer
.
MockCommunicator
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment