mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Merge pull request #4642 from wy65701436/fix-tr-issue
Update ci test images to busybox
This commit is contained in:
commit
86db5b763b
@ -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")
|
||||
}
|
||||
|
@ -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)")
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user