-
Notifications
You must be signed in to change notification settings - Fork 2
/
server_commands_test.go
88 lines (79 loc) · 1.62 KB
/
server_commands_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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// Code generated by generate_server_commands; DO NOT EDIT.
package brightbox
import (
"path"
"testing"
"gotest.tools/v3/assert"
)
func TestStartServer(t *testing.T) {
instance := testModify[Server, string](
t,
(*Client).StartServer,
"srv-lv426",
"server",
"POST",
path.Join("servers", "srv-lv426", "start"),
"",
)
assert.Equal(t, instance.ID, "srv-lv426")
}
func TestStopServer(t *testing.T) {
instance := testModify[Server, string](
t,
(*Client).StopServer,
"srv-lv426",
"server",
"POST",
path.Join("servers", "srv-lv426", "stop"),
"",
)
assert.Equal(t, instance.ID, "srv-lv426")
}
func TestRebootServer(t *testing.T) {
instance := testModify[Server, string](
t,
(*Client).RebootServer,
"srv-lv426",
"server",
"POST",
path.Join("servers", "srv-lv426", "reboot"),
"",
)
assert.Equal(t, instance.ID, "srv-lv426")
}
func TestResetServer(t *testing.T) {
instance := testModify[Server, string](
t,
(*Client).ResetServer,
"srv-lv426",
"server",
"POST",
path.Join("servers", "srv-lv426", "reset"),
"",
)
assert.Equal(t, instance.ID, "srv-lv426")
}
func TestShutdownServer(t *testing.T) {
instance := testModify[Server, string](
t,
(*Client).ShutdownServer,
"srv-lv426",
"server",
"POST",
path.Join("servers", "srv-lv426", "shutdown"),
"",
)
assert.Equal(t, instance.ID, "srv-lv426")
}
func TestActivateConsoleForServer(t *testing.T) {
instance := testModify[Server, string](
t,
(*Client).ActivateConsoleForServer,
"srv-lv426",
"server",
"POST",
path.Join("servers", "srv-lv426", "activate_console"),
"",
)
assert.Equal(t, instance.ID, "srv-lv426")
}