Skip to content

Commit 2e81130

Browse files
committed
refactor(validation): Update parameter order in runFirewallSubtests for consistency
- Changed the parameter order in `runFirewallSubtests` to place context first, aligning with common Go practices. - Updated all calls to `runFirewallSubtests` to reflect the new parameter order, enhancing code readability and maintainability.
1 parent b388dd9 commit 2e81130

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/validation/suite.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func RunValidationSuite(t *testing.T, config ProviderConfig) {
5050
})
5151
}
5252

53-
func runFirewallSubtests(t *testing.T, ctx context.Context, client v1.CloudInstanceReader, instance *v1.Instance, privateKey string, testPort int) {
53+
func runFirewallSubtests(ctx context.Context, t *testing.T, client v1.CloudInstanceReader, instance *v1.Instance, privateKey string, testPort int) {
5454
t.Helper()
5555

5656
t.Run("ValidateFirewallBlocksPort", func(t *testing.T) {
@@ -153,7 +153,7 @@ func RunInstanceLifecycleValidation(t *testing.T, config ProviderConfig) {
153153
require.NoError(t, err, "ValidateInstanceImage should pass")
154154
})
155155

156-
runFirewallSubtests(t, ctx, client, instance, ssh.GetTestPrivateKey(), v1.DefaultFirewallTestPort)
156+
runFirewallSubtests(ctx, t, client, instance, ssh.GetTestPrivateKey(), v1.DefaultFirewallTestPort)
157157

158158
if capabilities.IsCapable(v1.CapabilityStopStartInstance) && instance.Stoppable {
159159
t.Run("ValidateStopStartInstance", func(t *testing.T) {
@@ -337,7 +337,7 @@ func RunFirewallValidation(t *testing.T, config ProviderConfig, opts FirewallVal
337337
testPort = v1.DefaultFirewallTestPort
338338
}
339339

340-
runFirewallSubtests(t, ctx, client, instance, ssh.GetTestPrivateKey(), testPort)
340+
runFirewallSubtests(ctx, t, client, instance, ssh.GetTestPrivateKey(), testPort)
341341

342342
// Test that SSH port is accessible (sanity check)
343343
t.Run("ValidateSSHPortAccessible", func(t *testing.T) {

0 commit comments

Comments
 (0)