Merge branch 'master' of https://github.com/goharbor/harbor into fix-resource-order

This commit is contained in:
wang yan 2020-08-19 15:30:48 +08:00
commit a7b9495ba0
2 changed files with 7 additions and 2 deletions

View File

@ -261,7 +261,7 @@ func (aj *AJAPI) submit(ajr *models.AdminJobReq) {
if jb.UpdateTime.Add(2 * time.Hour).After(time.Now()) {
if isOnGoing(jb.Status) {
err := errors.Errorf("reject job submitting: job %s with ID %d is %s", jb.Name, jb.ID, jb.Status)
aj.SendInternalServerError(errors.Wrap(err, "submit : AJAPI"))
aj.SendConflictError(errors.Wrap(err, "submit : AJAPI"))
return
}

View File

@ -267,6 +267,11 @@ describe("ArtifactListTabComponent (inline template)", () => {
}
};
const mockNewArtifactService = {
TriggerArtifactChan$: {
subscribe: (fn) => {
}
},
listArtifactsResponse: () => {
if (filtereName === 'sha256:3e33e3e3') {
return of(
@ -314,7 +319,7 @@ describe("ArtifactListTabComponent (inline template)", () => {
ArtifactDefaultService,
{ provide: Router, useValue: mockRouter },
{ provide: SERVICE_CONFIG, useValue: config },
{ provide: ArtifactService, useValue: mockArtifactService },
{ provide: ArtifactService, useValue: mockNewArtifactService },
{ provide: ProjectService, useClass: ProjectDefaultService },
{ provide: ScanningResultService, useClass: ScanningResultDefaultService },
{ provide: LabelService, useClass: LabelDefaultService },