-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathintegration_test.go
More file actions
37 lines (31 loc) · 1.11 KB
/
integration_test.go
File metadata and controls
37 lines (31 loc) · 1.11 KB
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
// +build integration
package tests
import (
"testing"
"github.com/deis/deis/tests/utils"
)
var (
gitCloneCmd = "if [ ! -d {{.ExampleApp}} ] ; then git clone https://github.com/deis/{{.ExampleApp}}.git ; fi"
gitRemoveCmd = "git remote remove deis"
gitPushCmd = "git push deis master"
gitAddCmd = "git add ."
gitCommitCmd = "git commit -m fake"
)
func TestGlobal(t *testing.T) {
params := utils.GetGlobalConfig()
cookieTest(t, params)
utils.Execute(t, authRegisterCmd, params, false, "")
utils.Execute(t, keysAddCmd, params, false, "")
utils.Execute(t, clustersCreateCmd, params, false, "")
}
func cookieTest(t *testing.T, params *utils.DeisTestConfig) {
// Regression test for https://github.com/deis/deis/pull/1136
// Ensure that cookies are cleared on auth:register and auth:cancel
utils.Execute(t, authRegisterCmd, params, false, "")
cmd := "cat ~/.deis/cookies.txt"
utils.CheckList(t, cmd, params, "csrftoken", false)
utils.CheckList(t, cmd, params, "sessionid", false)
utils.AuthCancel(t, params)
utils.CheckList(t, cmd, params, "csrftoken", true)
utils.CheckList(t, cmd, params, "sessionid", true)
}