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
358b0078
Commit
358b0078
authored
Jan 13, 2014
by
Matthew McKeen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docker-import + docker-push: Add some beginning tests. #774
parent
637fa382
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
2 deletions
+62
-2
post-processor/docker-import/post-processor.go
post-processor/docker-import/post-processor.go
+0
-2
post-processor/docker-import/post-processor_test.go
post-processor/docker-import/post-processor_test.go
+31
-0
post-processor/docker-push/post-processor_test.go
post-processor/docker-push/post-processor_test.go
+31
-0
No files found.
post-processor/docker-import/post-processor.go
View file @
358b0078
...
...
@@ -67,8 +67,6 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
id
:=
artifact
.
Id
()
ui
.
Say
(
"Importing image: "
+
id
)
// TODO Set artifact ID so that docker-push can use it
if
p
.
config
.
Tag
==
""
{
cmd
:=
exec
.
Command
(
"docker"
,
...
...
post-processor/docker-import/post-processor_test.go
0 → 100644
View file @
358b0078
package
dockerimport
import
(
"bytes"
"github.com/mitchellh/packer/packer"
"testing"
)
func
testConfig
()
map
[
string
]
interface
{}
{
return
map
[
string
]
interface
{}{}
}
func
testPP
(
t
*
testing
.
T
)
*
PostProcessor
{
var
p
PostProcessor
if
err
:=
p
.
Configure
(
testConfig
());
err
!=
nil
{
t
.
Fatalf
(
"err: %s"
,
err
)
}
return
&
p
}
func
testUi
()
*
packer
.
BasicUi
{
return
&
packer
.
BasicUi
{
Reader
:
new
(
bytes
.
Buffer
),
Writer
:
new
(
bytes
.
Buffer
),
}
}
func
TestPostProcessor_ImplementsPostProcessor
(
t
*
testing
.
T
)
{
var
_
packer
.
PostProcessor
=
new
(
PostProcessor
)
}
post-processor/docker-push/post-processor_test.go
0 → 100644
View file @
358b0078
package
dockerpush
import
(
"bytes"
"github.com/mitchellh/packer/packer"
"testing"
)
func
testConfig
()
map
[
string
]
interface
{}
{
return
map
[
string
]
interface
{}{}
}
func
testPP
(
t
*
testing
.
T
)
*
PostProcessor
{
var
p
PostProcessor
if
err
:=
p
.
Configure
(
testConfig
());
err
!=
nil
{
t
.
Fatalf
(
"err: %s"
,
err
)
}
return
&
p
}
func
testUi
()
*
packer
.
BasicUi
{
return
&
packer
.
BasicUi
{
Reader
:
new
(
bytes
.
Buffer
),
Writer
:
new
(
bytes
.
Buffer
),
}
}
func
TestPostProcessor_ImplementsPostProcessor
(
t
*
testing
.
T
)
{
var
_
packer
.
PostProcessor
=
new
(
PostProcessor
)
}
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