mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
chore: update golangci-lint config and fix lint issues (#542)
* chore: update golangci-lint config and fix lint issues
This commit is contained in:
@@ -29,7 +29,7 @@ func TestCompressDir(t *testing.T) {
|
||||
defer os.RemoveAll(tempDir)
|
||||
|
||||
err := CompressDir(tempDir)
|
||||
assert.NoError(t, err, "compressDir should not return an error")
|
||||
require.NoError(t, err, "compressDir should not return an error")
|
||||
|
||||
// Check if the zip file exists
|
||||
zipFile := filepath.Join(tempDir, filepath.Base(tempDir)+".zip")
|
||||
@@ -38,7 +38,7 @@ func TestCompressDir(t *testing.T) {
|
||||
|
||||
t.Run("Directory Does Not Exist", func(t *testing.T) {
|
||||
err := CompressDir("/path/to/nonexistent/directory")
|
||||
assert.Error(t, err, "should return an error for non-existent directory")
|
||||
require.Error(t, err, "should return an error for non-existent directory")
|
||||
})
|
||||
|
||||
t.Run("Empty Directory", func(t *testing.T) {
|
||||
@@ -47,6 +47,6 @@ func TestCompressDir(t *testing.T) {
|
||||
defer os.RemoveAll(tempDir)
|
||||
|
||||
err = CompressDir(tempDir)
|
||||
assert.Error(t, err, "should return an error for an empty directory")
|
||||
require.Error(t, err, "should return an error for an empty directory")
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user