-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathloggerComponent_test.go
More file actions
39 lines (27 loc) · 959 Bytes
/
loggerComponent_test.go
File metadata and controls
39 lines (27 loc) · 959 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 (
"github.com/deis/deis/tests/dockercliutils"
"fmt"
"testing"
)
func runDeisLoggerTest(t *testing.T){
cli,stdout,stdoutPipe := dockercliutils.GetNewClient( )
done := make(chan bool, 1)
dockercliutils.BuildDockerfile(t,"../"," ")
dockercliutils.RunDeisDataTest(t,"--name", "deis-logger-data", "-v", "/var/log/deis", "deis/base", "true")
IPAddress := dockercliutils.GetInspectData(t,"{{ .NetworkSettings.IPAddress }}", "deis-etcd")
done <-true
go func(){
<- done
fmt.Println("inside run etcd")
dockercliutils.RunContainer(t,cli,"--name", "deis-logger", "-p", "514:514/udp", "-e", "PUBLISH=514", "-e", "HOST="+IPAddress, "--volumes-from", "deis-logger-data", "deis/logger")
}()
dockercliutils.PrintToStdout(t,stdout,stdoutPipe,"Booting")
}
func TestBuild(t *testing.T) {
fmt.Println("1st")
dockercliutils.RunEtcdTest(t)
fmt.Println("2nd")
fmt.Println("3rd")
runDeisLoggerTest(t)
}