mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-04-28 11:30:15 +00:00
- 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
25 lines
461 B
Go
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)
|
|
}
|