Skip to content

Commit

Permalink
Merge pull request #2079 from tecarter94/prevent-port-forward-conflic…
Browse files Browse the repository at this point in the history
…t-maven-repo

Remove hardcoding of local port when port forwarding maven repo
  • Loading branch information
rnc authored Sep 10, 2024
2 parents 929d4cc + 93ee390 commit 72e9c39
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions openshift-with-appstudio-test/e2e/basictests.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,16 +688,14 @@ func downloadArtifact(mavenRepoDetails *MavenRepoDetails, gav string, ext string
}

func getMavenRepoDetails(ta *testArgs) (*MavenRepoDetails, *portforward.PortForward) {
localPort := 8081
pf := portforward.PortForward{
Config: kubeConfig,
Clientset: kubeClient,
Labels: metav1.LabelSelector{MatchLabels: map[string]string{"app": v1alpha1.RepoDeploymentName}},
DestinationPort: 8080,
ListenPort: localPort,
Namespace: ta.ns,
}
_, err := pf.Start(context.TODO())
localPort, err := pf.Start(context.TODO())
if err != nil {
debugAndFailTest(ta, fmt.Sprintf("unable to port forward maven repo %s", err.Error()))
return nil, nil
Expand Down

0 comments on commit 72e9c39

Please sign in to comment.