func runDeisDatabaseTest( t *testing.T, testID string, etcdPort string, servicePort string) { var err error dockercli.RunDeisDataTest(t, "--name", "deis-database-data", "-v", "/var/lib/postgresql", "deis/base", "true") cli, stdout, stdoutPipe := dockercli.GetNewClient() go func() { err = dockercli.RunContainer(cli, "--name", "deis-database-"+testID, "--rm", "-p", servicePort+":5432", "-e", "PUBLISH="+servicePort, "-e", "HOST="+utils.GetHostIPAddress(), "-e", "ETCD_PORT="+etcdPort, "--volumes-from", "deis-database-data", "deis/database:"+testID) }() dockercli.PrintToStdout(t, stdout, stdoutPipe, "deis-database running") if err != nil { t.Fatal(err) } }
func runDeisBuilderTest( t *testing.T, testID string, etcdPort string, servicePort string) { var err error dockercli.RunDeisDataTest(t, "--name", "deis-builder-data", "-v", "/var/lib/docker", "deis/base", "true") cli, stdout, stdoutPipe := dockercli.GetNewClient() go func() { err = dockercli.RunContainer(cli, "--name", "deis-builder-"+testID, "--rm", "-p", servicePort+":22", "-e", "PUBLISH=22", "-e", "STORAGE_DRIVER=aufs", "-e", "HOST="+utils.GetHostIPAddress(), "-e", "ETCD_PORT="+etcdPort, "-e", "PORT="+servicePort, "--volumes-from", "deis-builder-data", "--privileged", "deis/builder:"+testID) }() dockercli.PrintToStdout(t, stdout, stdoutPipe, "deis-builder running") if err != nil { t.Fatal(err) } }