[hyper-provider] update hypercli in vendor
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
"github.com/docker/docker/pkg/integration/checker"
|
||||
"github.com/go-check/check"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func (s *DockerSuite) TestCliLoadFromUrlLargeImageArchiveFile(c *check.C) {
|
||||
printTestCaseName(); defer printTestDuration(time.Now())
|
||||
printTestCaseName()
|
||||
defer printTestDuration(time.Now())
|
||||
testRequires(c, DaemonIsLinux)
|
||||
|
||||
imageName := "consol/centos-xfce-vnc";
|
||||
imageUrl := "http://image-tarball.s3.amazonaws.com/test/public/consol_centos-xfce-vnc.tar"; //1.53GB
|
||||
imageName := "consol/centos-xfce-vnc"
|
||||
imageUrl := "http://image-tarball.s3.amazonaws.com/test/public/consol_centos-xfce-vnc.tar" //1.53GB
|
||||
|
||||
output, exitCode, err := dockerCmdWithError("load", "-i", imageUrl)
|
||||
c.Assert(output, checker.Contains, "Starting to download and load the image archive, please wait...\n")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
"github.com/docker/docker/pkg/integration/checker"
|
||||
"github.com/go-check/check"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"gopkg.in/mgo.v2"
|
||||
"gopkg.in/mgo.v2/bson"
|
||||
@@ -13,14 +13,14 @@ import (
|
||||
)
|
||||
|
||||
func (s *DockerSuite) TestCliLoadFromUrlLegacyImageArchiveFileWithQuota(c *check.C) {
|
||||
printTestCaseName(); defer printTestDuration(time.Now())
|
||||
printTestCaseName()
|
||||
defer printTestDuration(time.Now())
|
||||
testRequires(c, DaemonIsLinux)
|
||||
|
||||
imageName := "ubuntu";
|
||||
imageName := "ubuntu"
|
||||
legacyImageUrl := "http://image-tarball.s3.amazonaws.com/test/public/old/ubuntu_1.8.tar.gz"
|
||||
imageUrl := "http://image-tarball.s3.amazonaws.com/test/public/ubuntu.tar.gz"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
checkImageQuota(c, 2)
|
||||
//load legacy image(saved by docker 1.8)
|
||||
@@ -34,7 +34,6 @@ func (s *DockerSuite) TestCliLoadFromUrlLegacyImageArchiveFileWithQuota(c *check
|
||||
c.Assert(output, checker.Contains, imageName)
|
||||
c.Assert(len(strings.Split(output, "\n")), checker.Equals, 3)
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
checkImageQuota(c, 1)
|
||||
//load new format image(saved by docker 1.10)
|
||||
@@ -48,7 +47,6 @@ func (s *DockerSuite) TestCliLoadFromUrlLegacyImageArchiveFileWithQuota(c *check
|
||||
c.Assert(output, checker.Contains, imageName)
|
||||
c.Assert(len(strings.Split(output, "\n")), checker.Equals, 3)
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
checkImageQuota(c, 1)
|
||||
//delete single layer
|
||||
@@ -71,7 +69,6 @@ func (s *DockerSuite) TestCliLoadFromUrlLegacyImageArchiveFileWithQuota(c *check
|
||||
c.Assert(output, checker.Contains, "<none>")
|
||||
c.Assert(len(strings.Split(output, "\n")), checker.Equals, 6)
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
checkImageQuota(c, 1)
|
||||
//delete all rest layer
|
||||
@@ -91,7 +88,6 @@ func (s *DockerSuite) TestCliLoadFromUrlLegacyImageArchiveFileWithQuota(c *check
|
||||
c.Assert(len(strings.Split(output, "\n")), checker.Equals, 2)
|
||||
}
|
||||
|
||||
|
||||
//func (s *DockerSuite) TestCliLoadFromUrlLegacyCheckImageQuota(c *check.C) {
|
||||
// printTestCaseName(); defer printTestDuration(time.Now())
|
||||
// testRequires(c, DaemonIsLinux)
|
||||
@@ -113,14 +109,13 @@ func checkImageQuota(c *check.C, expected int) {
|
||||
Images int `bson:"images"`
|
||||
}
|
||||
type Resourceinfo struct {
|
||||
Total Total `bson:"total"`
|
||||
Total Total `bson:"total"`
|
||||
Balance Balance `bson:"balance"`
|
||||
}
|
||||
type Tenant struct {
|
||||
Resourceinfo Resourceinfo `bson:"resourceinfo"`
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////
|
||||
//init connection to mongodb
|
||||
session, err := mgo.Dial(os.Getenv("MONGODB_URL"))
|
||||
@@ -144,7 +139,6 @@ func checkImageQuota(c *check.C, expected int) {
|
||||
c.Assert(resultCred.TenantId, checker.NotNil)
|
||||
tenantId := resultCred.TenantId
|
||||
|
||||
|
||||
///////////////////////////////////////////
|
||||
// query image quota by tenant
|
||||
collection = db.C("tenant")
|
||||
|
||||
@@ -63,4 +63,4 @@ func (s *DockerSuite) TestCliLoadFromLocalTarSize600MB(c *check.C) {
|
||||
//check image
|
||||
images, _ = dockerCmd(c, "images", "jenkins:latest")
|
||||
c.Assert(images, checker.Contains, "jenkins")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
"os"
|
||||
"os/exec"
|
||||
"time"
|
||||
|
||||
"github.com/go-check/check"
|
||||
"github.com/docker/docker/pkg/integration/checker"
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
||||
func (s *DockerSuite) TestCliRegionBasic(c *check.C) {
|
||||
@@ -16,7 +16,7 @@ func (s *DockerSuite) TestCliRegionBasic(c *check.C) {
|
||||
var (
|
||||
defaultRegion = os.Getenv("REGION")
|
||||
anotherRegion = ""
|
||||
err error
|
||||
err error
|
||||
)
|
||||
switch defaultRegion {
|
||||
case "":
|
||||
|
||||
Reference in New Issue
Block a user