diff --git a/src/ui/api/repository_test.go b/src/ui/api/repository_test.go index 292a8f21b..b04a7e476 100644 --- a/src/ui/api/repository_test.go +++ b/src/ui/api/repository_test.go @@ -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") } diff --git a/src/ui/api/search_test.go b/src/ui/api/search_test.go index 54056f258..00991ca85 100644 --- a/src/ui/api/search_test.go +++ b/src/ui/api/search_test.go @@ -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)") } diff --git a/tests/pushimage.sh b/tests/pushimage.sh index fef60750c..7b91e673f 100755 --- a/tests/pushimage.sh +++ b/tests/pushimage.sh @@ -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