@@ -38,8 +38,8 @@ func TestBuilder(t *testing.T) {
3838 defer cli .CmdRm ("-f" , etcdName )
3939 handler := etcdutils .InitEtcd (setdir , setkeys , etcdPort )
4040 etcdutils .PublishEtcd (t , handler )
41- ipaddr , port := utils .HostAddress (), utils .RandomPort ()
42- fmt .Printf ("--- Run deis/builder:%s at %s:%s\n " , tag , ipaddr , port )
41+ host , port := utils .HostAddress (), utils .RandomPort ()
42+ fmt .Printf ("--- Run deis/builder:%s at %s:%s\n " , tag , host , port )
4343 name := "deis-builder-" + tag
4444 defer cli .CmdRm ("-f" , name )
4545 go func () {
@@ -48,18 +48,21 @@ func TestBuilder(t *testing.T) {
4848 "--name" , name ,
4949 "--rm" ,
5050 "-p" , port + ":22" ,
51- "-e" , "PUBLISH =22" ,
51+ "-e" , "PORT =22" ,
5252 "-e" , "STORAGE_DRIVER=aufs" ,
53- "-e" , "HOST=" + ipaddr ,
53+ "-e" , "HOST=" + host ,
5454 "-e" , "ETCD_PORT=" + etcdPort ,
55- "-e" , "PORT =" + port ,
55+ "-e" , "EXTERNAL_PORT =" + port ,
5656 "--privileged" , "deis/builder:" + tag )
5757 }()
5858 dockercli .PrintToStdout (t , stdout , stdoutPipe , "deis-builder running" )
5959 if err != nil {
6060 t .Fatal (err )
6161 }
62- // TODO: builder needs a few seconds to wake up here--fixme!
62+ // FIXME: builder needs a few seconds to wake up here!
63+ // FIXME: Wait until etcd keys are published
6364 time .Sleep (5000 * time .Millisecond )
6465 dockercli .DeisServiceTest (t , name , port , "tcp" )
66+ etcdutils .VerifyEtcdValue (t , "/deis/builder/host" , host , etcdPort )
67+ etcdutils .VerifyEtcdValue (t , "/deis/builder/port" , port , etcdPort )
6568}
0 commit comments