(t *testing.T)
| 42 | } |
| 43 | |
| 44 | func TestInitDnoteDirs(t *testing.T) { |
| 45 | tmpDir := t.TempDir() |
| 46 | |
| 47 | paths := Paths{ |
| 48 | Config: filepath.Join(tmpDir, "config"), |
| 49 | Data: filepath.Join(tmpDir, "data"), |
| 50 | Cache: filepath.Join(tmpDir, "cache"), |
| 51 | } |
| 52 | |
| 53 | // Initialize directories |
| 54 | err := InitDnoteDirs(paths) |
| 55 | assert.Equal(t, err, nil, "InitDnoteDirs should succeed") |
| 56 | assertDirsExist(t, paths) |
| 57 | |
| 58 | // Call again - should be idempotent |
| 59 | err = InitDnoteDirs(paths) |
| 60 | assert.Equal(t, err, nil, "InitDnoteDirs should succeed when dirs already exist") |
| 61 | assertDirsExist(t, paths) |
| 62 | } |
nothing calls this directly
no test coverage detected