Pulse/internal/config/persistence_nocrypto_test.go
rcourtman ed78509f92 Fix flaky tests and improve coverage across alerts, api, and config packages
- Fix deadlock and race conditions in internal/alerts
- Add comprehensive error path tests for internal/config
- Fix 401 handling in internal/api
- Fix Docker Swarm task filtering test logic
2026-01-03 18:36:17 +00:00

25 lines
461 B
Go

package config
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSaveAIConfig_NoCrypto(t *testing.T) {
tempDir := t.TempDir()
cp := NewConfigPersistence(tempDir)
cp.crypto = nil
err := cp.SaveAIConfig(AIConfig{Enabled: true})
assert.NoError(t, err)
}
func TestSaveWebhooks_NoCrypto(t *testing.T) {
tempDir := t.TempDir()
cp := NewConfigPersistence(tempDir)
cp.crypto = nil
err := cp.SaveWebhooks(nil)
assert.NoError(t, err)
}