Skip to content

Commit 680e02a

Browse files
committed
fix: rename local 'resource' variable to avoid shadowing import
The local variable 'resource' in the e2e test was shadowing the imported 'resource' package, which could cause confusion or conflicts. Renamed to 'resourceData' to clarify intent and eliminate the naming collision.
1 parent 06c0575 commit 680e02a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/e2e/alphagenerate/generate_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,11 @@ func validateDeployImagePlugin(projectFile string) {
344344
// Validate the resource configuration
345345
Expect(deployImageConfig.Resources).ToNot(BeEmpty(), "Expected at least one resource for the DeployImage plugin")
346346

347-
resource := deployImageConfig.Resources[0]
348-
Expect(resource.Group).To(Equal("crew"), "Expected group to be 'crew'")
349-
Expect(resource.Kind).To(Equal("Memcached"), "Expected kind to be 'Memcached'")
347+
resourceData := deployImageConfig.Resources[0]
348+
Expect(resourceData.Group).To(Equal("crew"), "Expected group to be 'crew'")
349+
Expect(resourceData.Kind).To(Equal("Memcached"), "Expected kind to be 'Memcached'")
350350

351-
options := resource.Options
351+
options := resourceData.Options
352352
Expect(options.Image).To(Equal("memcached:1.6.15-alpine"), "Expected image to match")
353353
Expect(options.ContainerCommand).To(Equal("memcached,--memory-limit=64,modern,-v"),
354354
"Expected container command to match")

0 commit comments

Comments
 (0)