Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
fix(tests): data containers should not be shared
Browse files Browse the repository at this point in the history
Fixes #1964
  • Loading branch information
johanneswuerbach committed Sep 30, 2014
1 parent 617d12b commit 640892a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions database/tests/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ func TestDatabase(t *testing.T) {
cli, stdout, stdoutPipe := dockercli.NewClient()
dockercli.RunTestEtcd(t, etcdName, etcdPort)
defer cli.CmdRm("-f", etcdName)
dockercli.RunDeisDataTest(t, "--name", "deis-database-data",
dataName := "deis-database-data-" + tag
dockercli.RunDeisDataTest(t, "--name", dataName,
"-v", "/var/lib/postgresql", "deis/base", "true")
host, port := utils.HostAddress(), utils.RandomPort()
fmt.Printf("--- Run deis/database:%s at %s:%s\n", tag, host, port)
Expand All @@ -32,7 +33,7 @@ func TestDatabase(t *testing.T) {
"-e", "EXTERNAL_PORT="+port,
"-e", "HOST="+host,
"-e", "ETCD_PORT="+etcdPort,
"--volumes-from", "deis-database-data",
"--volumes-from", dataName,
"deis/database:"+tag)
}()
dockercli.PrintToStdout(t, stdout, stdoutPipe, "deis-database running")
Expand Down
5 changes: 3 additions & 2 deletions logger/tests/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ func TestLogger(t *testing.T) {
cli, stdout, stdoutPipe := dockercli.NewClient()
dockercli.RunTestEtcd(t, etcdName, etcdPort)
defer cli.CmdRm("-f", etcdName)
dockercli.RunDeisDataTest(t, "--name", "deis-logger-data",
dataName := "deis-logger-data-" + tag
dockercli.RunDeisDataTest(t, "--name", dataName,
"-v", "/var/log/deis", "deis/base", "/bin/true")
host, port := utils.HostAddress(), utils.RandomPort()
fmt.Printf("--- Run deis/logger:%s at %s:%s\n", tag, host, port)
Expand All @@ -32,7 +33,7 @@ func TestLogger(t *testing.T) {
"-e", "EXTERNAL_PORT="+port,
"-e", "HOST="+host,
"-e", "ETCD_PORT="+etcdPort,
"--volumes-from", "deis-logger-data",
"--volumes-from", dataName,
"deis/logger:"+tag)
}()
dockercli.PrintToStdout(t, stdout, stdoutPipe, "deis-logger running")
Expand Down
5 changes: 3 additions & 2 deletions registry/tests/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ func TestRegistry(t *testing.T) {
defer cli.CmdRm("-f", etcdName)
handler := etcdutils.InitEtcd(setdir, setkeys, etcdPort)
etcdutils.PublishEtcd(t, handler)
dockercli.RunDeisDataTest(t, "--name", "deis-registry-data",
dataName := "deis-registry-data-" + tag
dockercli.RunDeisDataTest(t, "--name", dataName,
"-v", "/data", "deis/base", "/bin/true")
host, port := utils.HostAddress(), utils.RandomPort()
fmt.Printf("--- Run deis/registry:%s at %s:%s\n", tag, host, port)
Expand All @@ -41,7 +42,7 @@ func TestRegistry(t *testing.T) {
"-e", "EXTERNAL_PORT="+port,
"-e", "HOST="+host,
"-e", "ETCD_PORT="+etcdPort,
"--volumes-from", "deis-registry-data",
"--volumes-from", dataName,
"deis/registry:"+tag)
}()
dockercli.PrintToStdout(t, stdout, stdoutPipe, "Booting")
Expand Down

0 comments on commit 640892a

Please sign in to comment.