Skip to content

Commit

Permalink
ci: Use temporary directory for unit tests
Browse files Browse the repository at this point in the history
This commit implements the use of a temporary directory for unit tests in order to ensure a clean and isolated environment for testing purposes.

Signed-off-by: Mayank Pal <mayankpal9654@gmail.com>
  • Loading branch information
mayankpall committed May 18, 2024
1 parent 90c6be0 commit 2364571
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 2364571

Please sign in to comment.