Skip to content

Commit

Permalink
ci: Use temporary directory for unit tests
Browse files Browse the repository at this point in the history
ensure a clean and isolated environment for testing purposes.

Signed-off-by: Mayank Pal <mayankpal9654@gmail.com>
  • Loading branch information
mayankpall committed May 19, 2024
1 parent 90c6be0 commit a19981e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/rbd/nodeserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func TestReadAffinity_GetReadAffinityMapOptions(t *testing.T) {
if err != nil {
t.Errorf("failed to marshal csi config info %v", err)
}
tmpConfPath := util.CsiConfigFile
tmpConfPath := t.TempDir() + "/ceph-csi.json"
err = os.Mkdir("/etc/ceph-csi-config", 0o600)
if err != nil {
t.Errorf("failed to create directory %s: %v", "/etc/ceph-csi-config", err)
Expand Down

0 comments on commit a19981e

Please sign in to comment.