Adds Test upstream button to maven upstream form

What does this MR do and why?

Adds Test upstream button to maven upstream form

When the form is in Create mode we call the group API with group path & paramters from the input field.

When the form in in Edit mode, we call the upstream API with the upstream id.

EE: true

References

  • Created a shared component TestMavenUpstreamButton so that it can be used in #559014[LinkExistingUpstream_MVC.png]
  • While editing, the Test upstream button tests the API with values stored for the upstream & does not take into account any edited changes made on the page. This is because the API does not allow passing any additional parameters for an existing upstream.

Screenshots or screen recordings

Create upstream Edit upstream
Screenshot_2025-08-25_at_3.42.48_pm Screenshot_2025-08-25_at_3.43.43_pm

How to set up and validate locally

  1. Ensure you have enabled the following feature flags
$ gdk rails console
Feature.enable(:maven_virtual_registry)
Feature.enable(:ui_for_virtual_registries)
  1. Go to a group
  2. Go to Deploy -> Virtual Registry
  3. Create a new maven registry
  4. Click on the Add upstream button
  5. The required fields are name, url. For the URL, you can use https://repo.maven.apache.org/maven2
  6. Click on the Test upstream button and confirm the functionality works as expected.
  7. Click on Create upstream and observe the list update
  8. Click on the edit icon and confirm that Test upstream button is available on the Test upstream page

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #560922 (closed)

Edited by Rahul Chanila

Merge request reports

Loading