Skip to content

Commit

Permalink
change to r
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisonB319 committed Mar 18, 2024
1 parent 7cb3aca commit d9387b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func runScenario(ctx context.Context, t *testing.T, r *mrand.Rand, opts *scenari

vmssSucceeded := true

vmssModel, cleanupVMSS, err := bootstrapVMSS(ctx, t, vmssName, opts, publicKeyBytes)
vmssModel, cleanupVMSS, err := bootstrapVMSS(ctx, t, r, vmssName, opts, publicKeyBytes)
if !opts.suiteConfig.KeepVMSS && cleanupVMSS != nil {
defer cleanupVMSS()
}
Expand Down
6 changes: 3 additions & 3 deletions e2e/vmss.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type VMSSOperationRetrier struct {
maxRetries int
}

func bootstrapVMSS(ctx context.Context, t *testing.T, vmssName string, opts *scenarioRunOpts, publicKeyBytes []byte) (*armcompute.VirtualMachineScaleSet, func(), error) {
func bootstrapVMSS(ctx context.Context, t *testing.T, r *mrand.Rand, vmssName string, opts *scenarioRunOpts, publicKeyBytes []byte) (*armcompute.VirtualMachineScaleSet, func(), error) {
nodeBootstrapping, err := getNodeBootstrapping(ctx, opts.nbc)
if err != nil {
return nil, nil, fmt.Errorf("unable to get node bootstrapping: %w", err)
Expand All @@ -49,8 +49,8 @@ func bootstrapVMSS(ctx context.Context, t *testing.T, vmssName string, opts *sce
log.Printf("finished deleting vmss %q", vmssName)
}

r := VMSSOperationRetrier{maxRetries: maxRetries}
vmssModel, err := r.createVMSSWithPayload(ctx, nodeBootstrapping.CustomData, nodeBootstrapping.CSE, vmssName, publicKeyBytes, opts)
rOpts := VMSSOperationRetrier{maxRetries: maxRetries}
vmssModel, err := rOpts.createVMSSWithPayload(ctx, nodeBootstrapping.CustomData, nodeBootstrapping.CSE, vmssName, publicKeyBytes, opts)
if err != nil {
return nil, cleanupVMSS, fmt.Errorf("unable to create VMSS with payload: %w", err)
}
Expand Down

0 comments on commit d9387b3

Please sign in to comment.