Update ci test images to busybox

This commit is contained in:
wangyan 2018-04-12 04:51:16 -07:00
parent 946b4b4ad8
commit 04816222c0
3 changed files with 6 additions and 6 deletions

View File

@ -195,7 +195,7 @@ func TestGetReposTop(t *testing.T) {
assert.Equal(int(200), code, "response code should be 200")
if r, ok := repos.([]*repoResp); ok {
assert.Equal(int(1), len(r), "the length should be 1")
assert.Equal(r[0].Name, "library/docker", "the name of repository should be library/docker")
assert.Equal(r[0].Name, "library/busybox", "the name of repository should be library/busybox")
} else {
t.Error("unexpected response")
}

View File

@ -48,7 +48,7 @@ func TestSearch(t *testing.T) {
} else {
assert.Equal(int(200), httpStatusCode, "httpStatusCode should be 200")
assert.Equal("library", result.Repositories[0].ProjectName, "Project name should be library")
assert.Equal("library/docker", result.Repositories[0].RepositoryName, "Repository name should be library/docker")
assert.Equal("library/busybox", result.Repositories[0].RepositoryName, "Repository name should be library/busybox")
assert.True(result.Repositories[0].ProjectPublic, "Project public status should be 1 (true)")
}
@ -60,7 +60,7 @@ func TestSearch(t *testing.T) {
} else {
assert.Equal(int(200), httpStatusCode, "httpStatusCode should be 200")
assert.Equal("library", result.Repositories[0].ProjectName, "Project name should be library")
assert.Equal("library/docker", result.Repositories[0].RepositoryName, "Repository name should be library/docker")
assert.Equal("library/busybox", result.Repositories[0].RepositoryName, "Repository name should be library/busybox")
assert.True(result.Repositories[0].ProjectPublic, "Project public status should be 1 (true)")
}

View File

@ -2,11 +2,11 @@
IP=`ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{print $1}'`
docker pull hello-world
docker pull docker
docker pull busybox
docker login -u admin -p Harbor12345 $IP:5000
docker tag hello-world $IP:5000/library/hello-world:latest
docker push $IP:5000/library/hello-world:latest
docker tag docker $IP:5000/library/docker:latest
docker push $IP:5000/library/docker:latest
docker tag busybox $IP:5000/library/busybox:latest
docker push $IP:5000/library/busybox:latest