Skip to content

Commit

Permalink
Updates org token test to use the CLI arg
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosNihelton committed Oct 4, 2023
1 parent 1679325 commit 6089462
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions end-to-end/organization_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ func TestOrganizationProvidedToken(t *testing.T) {
afterDistroRegistration
)

// Let's be lazy and don't fall into the risk of changing the function name without updating the places where its name is used.
currentFuncName := getCurrentFuncName()

testCases := map[string]struct {
whenToken whenToken

Expand All @@ -39,7 +42,7 @@ func TestOrganizationProvidedToken(t *testing.T) {

if tc.whenToken == beforeDistroRegistration {
activateOrgSubscription(t)
cleanup := startAgent(t, ctx)
cleanup := startAgent(t, ctx, currentFuncName)
defer cleanup()
}

Expand All @@ -57,7 +60,7 @@ func TestOrganizationProvidedToken(t *testing.T) {
require.NoError(t, err, "could not restart distro")

activateOrgSubscription(t)
cleanup := startAgent(t, ctx)
cleanup := startAgent(t, ctx, currentFuncName)
defer cleanup()

out, err := d.Command(ctx, "exit 0").CombinedOutput()
Expand Down

0 comments on commit 6089462

Please sign in to comment.