Skip to content

Commit

Permalink
Adapt e2e test to reality
Browse files Browse the repository at this point in the history
Signed-off-by: jannfis <[email protected]>
  • Loading branch information
jannfis committed Jan 7, 2025
1 parent fb94b82 commit 6639d55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agent/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ func (a *Agent) createApplication(incoming *v1alpha1.Application) (*v1alpha1.App
}

// Set target cluster to a sensible value
// TODO(jannfis): Make this actually configurable per agent
incoming.Spec.Destination.Server = ""
incoming.Spec.Destination.Name = "in-cluster"

Expand Down Expand Up @@ -327,6 +328,7 @@ func (a *Agent) updateApplication(incoming *v1alpha1.Application) (*v1alpha1.App
}

// Set target cluster to a sensible value
// TODO(jannfis): Make this actually configurable per agent
incoming.Spec.Destination.Server = ""
incoming.Spec.Destination.Name = "in-cluster"

Expand Down
3 changes: 3 additions & 0 deletions test/e2e2/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func (suite *BasicTestSuite) Test_AgentManaged() {
// principal
app = argoapp.Application{}
err = suite.PrincipalClient.Get(suite.Ctx, key, &app, metav1.GetOptions{})
// The destination on the agent will be set to in-cluster
app.Spec.Destination.Name = "in-cluster"
app.Spec.Destination.Server = ""
requires.NoError(err)
mapp := argoapp.Application{}
err = suite.ManagedAgentClient.Get(suite.Ctx, key, &mapp, metav1.GetOptions{})
Expand Down

0 comments on commit 6639d55

Please sign in to comment.