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
e9f7a141
Commit
e9f7a141
authored
Dec 09, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packer/rpc: use packer.MockArtifact
parent
105e5f6a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
26 deletions
+4
-26
packer/rpc/artifact_test.go
packer/rpc/artifact_test.go
+0
-22
packer/rpc/build_test.go
packer/rpc/build_test.go
+1
-1
packer/rpc/builder_test.go
packer/rpc/builder_test.go
+1
-1
packer/rpc/post_processor_test.go
packer/rpc/post_processor_test.go
+2
-2
No files found.
packer/rpc/artifact_test.go
View file @
e9f7a141
...
...
@@ -6,28 +6,6 @@ import (
"testing"
)
type
testArtifact
struct
{}
func
(
testArtifact
)
BuilderId
()
string
{
return
"bid"
}
func
(
testArtifact
)
Files
()
[]
string
{
return
[]
string
{
"a"
,
"b"
}
}
func
(
testArtifact
)
Id
()
string
{
return
"id"
}
func
(
testArtifact
)
String
()
string
{
return
"string"
}
func
(
testArtifact
)
Destroy
()
error
{
return
nil
}
func
TestArtifactRPC
(
t
*
testing
.
T
)
{
// Create the interface to test
a
:=
new
(
packer
.
MockArtifact
)
...
...
packer/rpc/build_test.go
View file @
e9f7a141
...
...
@@ -8,7 +8,7 @@ import (
"testing"
)
var
testBuildArtifact
=
&
test
Artifact
{}
var
testBuildArtifact
=
&
packer
.
Mock
Artifact
{}
type
testBuild
struct
{
nameCalled
bool
...
...
packer/rpc/builder_test.go
View file @
e9f7a141
...
...
@@ -7,7 +7,7 @@ import (
"testing"
)
var
testBuilderArtifact
=
&
test
Artifact
{}
var
testBuilderArtifact
=
&
packer
.
Mock
Artifact
{}
func
builderRPCClient
(
t
*
testing
.
T
)
(
*
packer
.
MockBuilder
,
packer
.
Builder
)
{
b
:=
new
(
packer
.
MockBuilder
)
...
...
packer/rpc/post_processor_test.go
View file @
e9f7a141
...
...
@@ -7,7 +7,7 @@ import (
"testing"
)
var
testPostProcessorArtifact
=
new
(
test
Artifact
)
var
testPostProcessorArtifact
=
new
(
packer
.
Mock
Artifact
)
type
TestPostProcessor
struct
{
configCalled
bool
...
...
@@ -62,7 +62,7 @@ func TestPostProcessorRPC(t *testing.T) {
}
// Test PostProcess
a
:=
new
(
test
Artifact
)
a
:=
new
(
packer
.
Mock
Artifact
)
ui
:=
new
(
testUi
)
artifact
,
_
,
err
:=
pClient
.
PostProcess
(
ui
,
a
)
if
err
!=
nil
{
...
...
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