Skip to content

Commit

Permalink
Update ci test images to busybox
Browse files Browse the repository at this point in the history
  • Loading branch information
wy65701436 committed Apr 13, 2018
1 parent 946b4b4 commit 0481622
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ui/api/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
4 changes: 2 additions & 2 deletions src/ui/api/search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
}

Expand All @@ -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)")
}

Expand Down
6 changes: 3 additions & 3 deletions tests/pushimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0481622

Please sign in to comment.