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
311c9eb5
Commit
311c9eb5
authored
Jun 10, 2015
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/digitalocean: fix unit tests
parent
9a393a56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
13 deletions
+3
-13
builder/digitalocean/builder_test.go
builder/digitalocean/builder_test.go
+3
-13
No files found.
builder/digitalocean/builder_test.go
View file @
311c9eb5
package
digitalocean
import
(
"github.com/mitchellh/packer/packer"
"os"
"strconv"
"testing"
)
func
init
()
{
// Clear out the credential env vars
os
.
Setenv
(
"DIGITALOCEAN_API_KEY"
,
""
)
os
.
Setenv
(
"DIGITALOCEAN_CLIENT_ID"
,
""
)
}
"github.com/mitchellh/packer/packer"
)
func
testConfig
()
map
[
string
]
interface
{}
{
return
map
[
string
]
interface
{}{
"client_id"
:
"foo"
,
"api_key"
:
"bar"
,
"api_token"
:
"bar"
,
}
}
...
...
@@ -78,7 +71,6 @@ func TestBuilderPrepare_Region(t *testing.T) {
expected
:=
"sfo1"
// Test set
config
[
"region_id"
]
=
0
config
[
"region"
]
=
expected
b
=
Builder
{}
warnings
,
err
=
b
.
Prepare
(
config
)
...
...
@@ -114,7 +106,6 @@ func TestBuilderPrepare_Size(t *testing.T) {
expected
:=
"1024mb"
// Test set
config
[
"size_id"
]
=
0
config
[
"size"
]
=
expected
b
=
Builder
{}
warnings
,
err
=
b
.
Prepare
(
config
)
...
...
@@ -150,7 +141,6 @@ func TestBuilderPrepare_Image(t *testing.T) {
expected
:=
"ubuntu-14-04-x64"
// Test set
config
[
"image_id"
]
=
0
config
[
"image"
]
=
expected
b
=
Builder
{}
warnings
,
err
=
b
.
Prepare
(
config
)
...
...
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