Skip to content

Conversation

Bhagyashreek8
Copy link
Collaborator

Describe your changes

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • I have made sure existing UTs are not impacted
  • I have executed all necessary linter and made sure internal pipeline/travis is not broken

Copy link
Member

@ashimagarg27 ashimagarg27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bhagyashreek8
Could you please run following commands and share o/p:

make coverage
go tool cover -html=cover.out

@Bhagyashreek8
Copy link
Collaborator Author

Screenshot 2025-07-27 at 9 54 58 PM

@Bhagyashreek8
Copy link
Collaborator Author

UT o/p

=== RUN   TestSetupSidecar
=== RUN   TestSetupSidecar/ValidGroupID
2025-07-27T21:53:15.715+0530	INFO	driver/fileOps.go:49	Setting owner and permissions of csi socket file. SIDECAR_GROUP_ID env must match the 'livenessprobe' sidecar container groupID for csi socket connection.
2025-07-27T21:53:15.715+0530	INFO	driver/fileOps.go:73	Successfully set owner and permissions of csi socket file.
=== RUN   TestSetupSidecar/InvalidGroupID
2025-07-27T21:53:15.715+0530	INFO	driver/fileOps.go:49	Setting owner and permissions of csi socket file. SIDECAR_GROUP_ID env must match the 'livenessprobe' sidecar container groupID for csi socket connection.
=== RUN   TestSetupSidecar/EmptyGroupID
2025-07-27T21:53:15.715+0530	INFO	driver/fileOps.go:49	Setting owner and permissions of csi socket file. SIDECAR_GROUP_ID env must match the 'livenessprobe' sidecar container groupID for csi socket connection.
2025-07-27T21:53:15.715+0530	WARN	driver/fileOps.go:53	Unable to fetch SIDECAR_GROUP_ID environment variable. Sidecar container(s) might fail...
github.com/IBM/ibm-object-csi-driver/pkg/driver.setupSidecar
	/Users/bhagyashreek/Documents/ObjectCsiDriver/ibm-object-csi-driver/pkg/driver/fileOps.go:53
github.com/IBM/ibm-object-csi-driver/pkg/driver.TestSetupSidecar.func1
	/Users/bhagyashreek/Documents/ObjectCsiDriver/ibm-object-csi-driver/pkg/driver/fileOps_test.go:143
testing.tRunner
	/Users/bhagyashreek/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.4.darwin-arm64/src/testing/testing.go:1792
2025-07-27T21:53:15.715+0530	INFO	driver/fileOps.go:73	Successfully set owner and permissions of csi socket file.
=== RUN   TestSetupSidecar/ChownError
2025-07-27T21:53:15.715+0530	INFO	driver/fileOps.go:49	Setting owner and permissions of csi socket file. SIDECAR_GROUP_ID env must match the 'livenessprobe' sidecar container groupID for csi socket connection.
=== RUN   TestSetupSidecar/ChmodError
2025-07-27T21:53:15.715+0530	INFO	driver/fileOps.go:49	Setting owner and permissions of csi socket file. SIDECAR_GROUP_ID env must match the 'livenessprobe' sidecar container groupID for csi socket connection.
--- PASS: TestSetupSidecar (0.00s)
    --- PASS: TestSetupSidecar/ValidGroupID (0.00s)
    --- PASS: TestSetupSidecar/InvalidGroupID (0.00s)
    --- PASS: TestSetupSidecar/EmptyGroupID (0.00s)
    --- PASS: TestSetupSidecar/ChownError (0.00s)
    --- PASS: TestSetupSidecar/ChmodError (0.00s)

@ashimagarg27 ashimagarg27 merged commit 2056bf1 into main Jul 28, 2025
3 checks passed
@ashimagarg27 ashimagarg27 deleted the bha-ut branch July 28, 2025 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants