-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathcacheComponent_test.go
More file actions
39 lines (30 loc) · 935 Bytes
/
cacheComponent_test.go
File metadata and controls
39 lines (30 loc) · 935 Bytes
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
package verbose
import (
"fmt"
"github.com/deis/deis/tests/dockercliutils"
"strings"
"testing"
)
func runDeisCacheTest(t *testing.T) {
cli, stdout, stdoutPipe := dockercliutils.GetNewClient()
done := make(chan bool, 1)
dockercliutils.BuildDockerfile(t, "../", " ")
IPAddress := dockercliutils.GetInspectData(t, "{{ .NetworkSettings.IPAddress }}", "deis-etcd")
if strings.Contains(IPAddress, "Error") {
t.Fatalf("worng IP %s", IPAddress)
}
fmt.Println(IPAddress + "IPADRESS")
done <- true
go func() {
<-done
fmt.Println("inside run cahce run continer")
dockercliutils.RunContainer(t, cli, "--name", "deis-cache", "-p", "6379:6379", "-e", "PUBLISH=6379", "-e", "HOST="+IPAddress, "deis/cache")
}()
dockercliutils.PrintToStdout(t, stdout, stdoutPipe, "Server started")
}
func TestBuild(t *testing.T) {
fmt.Println("1st")
dockercliutils.RunEtcdTest(t, "foobar")
fmt.Println("2nd")
runDeisCacheTest(t)
}