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
8a78d4d8
Commit
8a78d4d8
authored
May 04, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packer/rpc: Test Builder.Run
parent
c537c304
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
packer/rpc/builder_test.go
packer/rpc/builder_test.go
+15
-0
No files found.
packer/rpc/builder_test.go
View file @
8a78d4d8
...
@@ -48,6 +48,21 @@ func TestBuilderRPC(t *testing.T) {
...
@@ -48,6 +48,21 @@ func TestBuilderRPC(t *testing.T) {
bClient
.
Prepare
(
config
)
bClient
.
Prepare
(
config
)
assert
.
True
(
b
.
prepareCalled
,
"prepare should be called"
)
assert
.
True
(
b
.
prepareCalled
,
"prepare should be called"
)
assert
.
Equal
(
b
.
prepareConfig
,
42
,
"prepare should be called with right arg"
)
assert
.
Equal
(
b
.
prepareConfig
,
42
,
"prepare should be called with right arg"
)
// Test Run
build
:=
&
testBuild
{}
ui
:=
&
testUi
{}
bClient
.
Run
(
build
,
ui
)
assert
.
True
(
b
.
runCalled
,
"runs hould be called"
)
if
b
.
runCalled
{
b
.
runBuild
.
Prepare
()
assert
.
True
(
build
.
prepareCalled
,
"prepare should be called"
)
b
.
runUi
.
Say
(
"format"
)
assert
.
True
(
ui
.
sayCalled
,
"say should be called"
)
assert
.
Equal
(
ui
.
sayFormat
,
"format"
,
"format should be correct"
)
}
}
}
func
TestBuilder_ImplementsBuild
(
t
*
testing
.
T
)
{
func
TestBuilder_ImplementsBuild
(
t
*
testing
.
T
)
{
...
...
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