fix(tests): normalize whitespace in plugin and hub sync test files

This commit is contained in:
GitHub Actions
2026-01-08 12:44:13 +00:00
parent 277b7b53ee
commit f40e4805d6
2 changed files with 20 additions and 20 deletions

View File

@@ -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