-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathregistryComponent_test.go
More file actions
39 lines (27 loc) · 944 Bytes
/
registryComponent_test.go
File metadata and controls
39 lines (27 loc) · 944 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 runDeisRegistryTest(t *testing.T){
cli,stdout,stdoutPipe := dockercliutils.GetNewClient( )
done := make(chan bool, 1)
dockercliutils.BuildDockerfile(t,"../"," ")
dockercliutils.RunDeisDataTest(t,"--name", "deis-registry-data", "-v", "/data", "deis/base", "/bin/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-registry", "-p", "5000:5000", "-e", "PUBLISH=5000", "-e", "HOST="+IPAddress, "--volumes-from", "deis-registry-data", "deis/registry")
}()
dockercliutils.PrintToStdout(t,stdout,stdoutPipe,"Booting")
}
func TestBuild(t *testing.T) {
fmt.Println("1st")
dockercliutils.RunEtcdTest(t)
fmt.Println("2nd")
fmt.Println("3rd")
runDeisRegistryTest(t)
}