-
Notifications
You must be signed in to change notification settings - Fork 5
/
arubacloud_test.go
49 lines (38 loc) · 1.05 KB
/
arubacloud_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package main
import (
"testing"
"github.com/docker/machine/libmachine/drivers"
)
func TestConfigFlags(t *testing.T) {
driver := new(Driver)
createFlags := &drivers.CheckDriverOptions{
FlagsValues: map[string]interface{}{
"ac_username": "ARU-xxxx",
"ac_password": "xxxx",
"ac_admin_password": "xxxx",
"ac_endpoint": "dc1",
"ac_template": "ubuntu_xx_x",
"ac_size": "Large",
"ac_ipv6": "true",
},
CreateFlags: driver.GetCreateFlags(),
}
if err := driver.SetConfigFromFlags(createFlags); err != nil {
t.Errorf("Setting driver create flags failed. Error: " + err.Error())
}
}
func TestDefaultConfigFlags(t *testing.T) {
driver := new(Driver)
createFlags := &drivers.CheckDriverOptions{
FlagsValues: map[string]interface{}{
"ac_username": "ARU-xxxx",
"ac_password": "xxxx",
"ac_admin_password": "xxxx",
"ac_ipv6": "true",
},
CreateFlags: driver.GetCreateFlags(),
}
if err := driver.SetConfigFromFlags(createFlags); err != nil {
t.Errorf("Setting driver create flags failed. Error: " + err.Error())
}
}