@@ -14,28 +14,31 @@ import (
1414func runDeisControllerTest (t * testing.T , testSessionUID string , etcdPort string , servicePort string ) {
1515 cli , stdout , stdoutPipe := dockercliutils .GetNewClient ()
1616 done := make (chan bool , 1 )
17- dockercliutils .BuildDockerfile (t , "../" , "deis/controller:" + testSessionUID )
18- //docker run --name deis-controller -p 8000:8000 -e PUBLISH=8000
19- // -e HOST=${COREOS_PRIVATE_IPV4} --volumes-from=deis-logger deis/controller
20- IPAddress := utils .GetHostIPAddress ()
17+ err := dockercliutils .BuildImage (t , "../" , "deis/controller:" + testSessionUID )
18+ if err != nil {
19+ t .Fatal (err )
20+ }
21+ ipaddr := utils .GetHostIPAddress ()
2122 done <- true
2223 go func () {
2324 <- done
24- dockercliutils .RunContainer (t , cli ,
25+ err = dockercliutils .RunContainer (cli ,
2526 "--name" , "deis-controller-" + testSessionUID ,
2627 "--rm" ,
2728 "-p" , servicePort + ":8000" ,
2829 "-e" , "PUBLISH=" + servicePort ,
29- "-e" , "HOST=" + IPAddress ,
30+ "-e" , "HOST=" + ipaddr ,
3031 "-e" , "ETCD_PORT=" + etcdPort ,
3132 "deis/controller:" + testSessionUID )
3233 }()
3334 time .Sleep (5000 * time .Millisecond )
3435 dockercliutils .PrintToStdout (t , stdout , stdoutPipe , "Booting" )
35-
36+ if err != nil {
37+ t .Fatal (err )
38+ }
3639}
3740
38- func TestBuild (t * testing.T ) {
41+ func TestController (t * testing.T ) {
3942 setkeys := []string {"/deis/registry/protocol" ,
4043 "deis/registry/host" ,
4144 "/deis/registry/port" ,
0 commit comments