diff --git a/backend/internal/api/handlers/plugin_handler_test.go b/backend/internal/api/handlers/plugin_handler_test.go index 507c60a6..daebf823 100644 --- a/backend/internal/api/handlers/plugin_handler_test.go +++ b/backend/internal/api/handlers/plugin_handler_test.go @@ -35,16 +35,16 @@ func TestPluginHandler_ListPlugins(t *testing.T) { // Create a failed plugin in DB failedPlugin := models.Plugin{ - UUID: "plugin-uuid-1", - Name: "Failed Plugin", - Type: "failed-type", - Enabled: false, - Status: models.PluginStatusError, - Error: "Failed to load", - Version: "1.0.0", - Author: "Test Author", - FilePath: "/path/to/plugin.so", - LoadedAt: nil, + UUID: "plugin-uuid-1", + Name: "Failed Plugin", + Type: "failed-type", + Enabled: false, + Status: models.PluginStatusError, + Error: "Failed to load", + Version: "1.0.0", + Author: "Test Author", + FilePath: "/path/to/plugin.so", + LoadedAt: nil, } db.Create(&failedPlugin) @@ -301,7 +301,7 @@ func TestPluginHandler_DisablePlugin_AlreadyDisabled(t *testing.T) { responseBody := w.Body.String() assert.True(t, strings.Contains(responseBody, "already disabled") || - strings.Contains(responseBody, "disabled successfully"), + strings.Contains(responseBody, "disabled successfully"), "Expected message about already disabled or successful disable, got: %s", responseBody) } @@ -649,8 +649,8 @@ func TestPluginHandler_EnablePlugin_WithLoadError(t *testing.T) { // since the plugin is enabled in DB regardless of load success assert.True(t, strings.Contains(responseBody, "enabled but failed to load") || - strings.Contains(responseBody, "enabled successfully") || - strings.Contains(responseBody, "already enabled"), + strings.Contains(responseBody, "enabled successfully") || + strings.Contains(responseBody, "already enabled"), "Expected success or load failure message, got: %s", responseBody) // Verify database was updated diff --git a/backend/internal/crowdsec/hub_sync_test.go b/backend/internal/crowdsec/hub_sync_test.go index 45d43a50..a1074605 100644 --- a/backend/internal/crowdsec/hub_sync_test.go +++ b/backend/internal/crowdsec/hub_sync_test.go @@ -2034,10 +2034,10 @@ func TestExtractTarGz_SpecialCharactersInFilenames(t *testing.T) { targetDir := t.TempDir() files := map[string]string{ - "file with spaces.txt": "content 1", - "file-with-dashes.yaml": "content 2", + "file with spaces.txt": "content 1", + "file-with-dashes.yaml": "content 2", "file_with_underscores.yml": "content 3", - "file.multiple.dots.txt": "content 4", + "file.multiple.dots.txt": "content 4", } archive := makeTarGz(t, files) @@ -2277,9 +2277,9 @@ func TestPeekFirstYAML_FindsYAML(t *testing.T) { t.Parallel() svc := NewHubService(nil, nil, t.TempDir()) archive := makeTarGz(t, map[string]string{ - "readme.txt": "readme content", - "config.yaml": "name: test\nversion: 1.0", - "another.yml": "other: config", + "readme.txt": "readme content", + "config.yaml": "name: test\nversion: 1.0", + "another.yml": "other: config", }) result := svc.peekFirstYAML(archive) @@ -2291,7 +2291,7 @@ func TestPeekFirstYAML_NoYAMLFiles(t *testing.T) { t.Parallel() svc := NewHubService(nil, nil, t.TempDir()) archive := makeTarGz(t, map[string]string{ - "readme.txt": "readme", + "readme.txt": "readme", "config.json": "{}", })