This commit is contained in:
ryan
2026-07-13 15:17:45 +08:00
parent 08e61ce833
commit e0eb4e5975
334 changed files with 17212 additions and 12321 deletions
@@ -18,7 +18,6 @@ func TestListVisibleSystemConfigsUsesStoreCache(t *testing.T) {
defer cleanup()
ctx := context.Background()
repository.ResetSystemConfigRAMCacheForTest()
if err := repository.InvalidateVisibleSystemConfigsCache(ctx); err != nil {
t.Fatalf("InvalidateVisibleSystemConfigsCache() error = %v", err)
+4 -2
View File
@@ -4,7 +4,8 @@
package config
import ("encoding/json"
import (
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
@@ -13,7 +14,8 @@ import ("encoding/json"
"github.com/Rain-kl/Wavelet/internal/testhelper"
"github.com/gin-gonic/gin"
"github.com/Rain-kl/Wavelet/internal/common/response")
"github.com/Rain-kl/Wavelet/internal/common/response"
)
func TestGetPublicConfigUsesVisibility(t *testing.T) {
dbConn, _, cleanup := testhelper.SetupTestEnvironment(t)
@@ -19,7 +19,6 @@ func TestSystemConfigRAMCacheServesUntilInvalidated(t *testing.T) {
defer cleanup()
ctx := context.Background()
repository.ResetSystemConfigRAMCacheForTest()
if err := repository.InvalidateAllSystemConfigCaches(ctx); err != nil {
t.Fatalf("InvalidateAllSystemConfigCaches() error = %v", err)
@@ -72,7 +71,6 @@ func TestInvalidateSystemConfigCacheBroadcast(t *testing.T) {
defer cleanup()
ctx := context.Background()
repository.ResetSystemConfigRAMCacheForTest()
// Initially seed in cache
@@ -109,4 +107,4 @@ func TestInvalidateSystemConfigCacheBroadcast(t *testing.T) {
// Just a sanity check: we can publish a new manual update and verify subscription triggers
// which was done implicitly above.
}
}
}