forked from convox/rack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrack_test.go
77 lines (66 loc) · 1.99 KB
/
rack_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
package main
// func TestRackUpdateStable(t *testing.T) {
// versions, err := version.All()
// require.NoError(t, err)
// stable, err := versions.Resolve("stable")
// require.NoError(t, err)
// ts := testServer(t,
// test.Http{Method: "PUT", Body: fmt.Sprintf("version=%s", stable.Version), Path: "/system", Code: 200, Response: client.System{
// Name: "mysystem",
// Version: "ver",
// Count: 1,
// Type: "type",
// }},
// )
// defer ts.Close()
// test.Runs(t,
// test.ExecRun{
// Command: "convox rack update",
// Exit: 0,
// Stdout: fmt.Sprintf("Updating to %s... UPDATING\n", stable.Version),
// },
// )
// }
// func TestRackUpdateSpecified(t *testing.T) {
// ts := testServer(t,
// test.Http{Method: "PUT", Body: "version=20150909014908", Path: "/system", Code: 200, Response: client.System{
// Name: "mysystem",
// Version: "ver",
// Count: 1,
// Type: "type",
// }},
// )
// defer ts.Close()
// test.Runs(t,
// test.ExecRun{
// Command: "convox rack update 20150909014908",
// Exit: 0,
// Stdout: "Updating to 20150909014908... UPDATING\n",
// },
// )
// }
// func TestRackUpdateWait(t *testing.T) {
// ts := testServer(t,
// test.Http{Method: "PUT", Body: "version=20150909014908", Path: "/system", Code: 200, Response: client.System{
// Name: "mysystem",
// Version: "ver",
// Count: 1,
// Type: "type",
// }},
// test.Http{Method: "GET", Path: "/system", Code: 200, Response: client.System{
// Name: "mysystem",
// Status: "running",
// Version: "ver",
// Count: 1,
// Type: "type",
// }},
// )
// defer ts.Close()
// test.Runs(t,
// test.ExecRun{
// Command: "convox rack update 20150909014908 --wait",
// Exit: 0,
// Stdout: "Updating to 20150909014908... UPDATING\nWaiting for completion... OK\n",
// },
// )
// }