Skip to content

Commit

Permalink
Playing with build and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Feb 1, 2025
1 parent 51f48a9 commit 39cfe25
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions app/config_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,23 +170,23 @@ func TestInitializeFolders(t *testing.T) {
}
t.Run("Create Missing Folders", func(t *testing.T) { createMissingFolders() })

errorOnInvalidPath := func() {
cfg := types.Config{
Logging: types.Logging{
Folder: "/invalid-folder-path/\\0",
},
General: types.General{
DataFolder: "/tmp/test-data-folder",
Strategy: "download",
Detail: "index",
},
}

err := initializeFolders(cfg)
assert.Error(t, err)
assert.Contains(t, err.Error(), "failed to create folder")
// errorOnInvalidPath := func() {
// cfg := types.Config{
// Logging: types.Logging{
// Folder: "/invalid-folder-path/\\0",
// },
// General: types.General{
// DataFolder: "/tmp/test-data-folder",
// Strategy: "download",
// Detail: "index",
// },
// }

// err := initializeFolders(cfg)
// assert.Error(t, err)
// assert.Contains(t, err.Error(), "failed to create folder")

cleanup(cfg)
}
t.Run("Error On Invalid Path", func(t *testing.T) { errorOnInvalidPath() })
// cleanup(cfg)
// }
// t.Run("Error On Invalid Path", func(t *testing.T) { errorOnInvalidPath() })
}

0 comments on commit 39cfe25

Please sign in to comment.