Skip to content

Fix harbor integration test settings bug

What does this MR do and why?

Related to issues #390721 (closed) and &7650

  1. Fix the bug of Test settings button of harbor integration page. Before this change, we only checked to see if the harbor instance was online, now we can check to see if the project_name username password are right.

  2. Add HTML required validation to Project name field.

Screenshots or screen recordings

image

How to set up and validate locally

Test settings bug

  1. Create an account of https://demo.goharbor.io/.
  2. Create a project in GitLab.
  3. Click into the project detail page, Settings -> Integrations -> Harbor.
  4. Input the Harbor URL Project Name and incorrect Harbor username and Harbor password.
  5. Click the Test settings.
  6. It shows Connection Successful.

Missing required validation for Project Name

  1. Create an account of https://demo.goharbor.io/.
  2. Create a project in GitLab.
  3. Click into the project detail page, Settings -> Integrations -> Harbor.
  4. Input the Harbor username, Harbor password, click Save changes.
  5. You can see a HTML required tip under Harbor URL.
  6. Input the Harbor URL, click Save changes.
  7. You can see the Project Name doesn't have HTML required message.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Zehua Zhang

Merge request reports