Implement DockerRegistrySuite in integration-cli

To avoid manually creating and destroying registrys in tests.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov
2015-04-24 14:17:00 -07:00
parent b76bbae413
commit f696b1071a
5 changed files with 43 additions and 62 deletions
+2 -3
View File
@@ -1125,7 +1125,7 @@ func daemonTime(c *check.C) time.Time {
return dt
}
func setupRegistry(c *check.C) func() {
func setupRegistry(c *check.C) *testRegistryV2 {
testRequires(c, RegistryHosting)
reg, err := newTestRegistryV2(c)
if err != nil {
@@ -1143,8 +1143,7 @@ func setupRegistry(c *check.C) func() {
if err != nil {
c.Fatal("Timeout waiting for test registry to become available")
}
return func() { reg.Close() }
return reg
}
// appendBaseEnv appends the minimum set of environment variables to exec the