PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FEATURE (notifiers): Change testing notifier from Telegram to webhook
Rostislav Dugina17ea2f3e21c
diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.ymlindex ff6c0c94..a30d072a 100644--- a/.github/workflows/ci-release.yml+++ b/.github/workflows/ci-release.yml@@ -304,9 +304,6 @@ jobs:TEST_MARIADB_114_PORT=33114TEST_MARIADB_118_PORT=33118TEST_MARIADB_120_PORT=33120- # testing Telegram- TEST_TELEGRAM_BOT_TOKEN=${{ secrets.TEST_TELEGRAM_BOT_TOKEN }}- TEST_TELEGRAM_CHAT_ID=${{ secrets.TEST_TELEGRAM_CHAT_ID }}# supabaseTEST_SUPABASE_HOST=${{ secrets.TEST_SUPABASE_HOST }}TEST_SUPABASE_PORT=${{ secrets.TEST_SUPABASE_PORT }}diff --git a/backend/.env.development.example b/backend/.env.development.exampleindex df9e4243..94f49ef3 100644--- a/backend/.env.development.example+++ b/backend/.env.development.example@@ -45,9 +45,6 @@ TEST_MINIO_PORT=9000TEST_MINIO_CONSOLE_PORT=9001# testing NASTEST_NAS_PORT=7006-# testing Telegram-TEST_TELEGRAM_BOT_TOKEN=-TEST_TELEGRAM_CHAT_ID=# testing Azure Blob StorageTEST_AZURITE_BLOB_PORT=10000# supabasediff --git a/backend/internal/config/config.go b/backend/internal/config/config.goindex 3ca4a066..9b9600df 100644--- a/backend/internal/config/config.go+++ b/backend/internal/config/config.go@@ -109,10 +109,6 @@ type EnvVariables struct {CloudflareTurnstileSecretKey string `env:"CLOUDFLARE_TURNSTILE_SECRET_KEY"`CloudflareTurnstileSiteKey string `env:"CLOUDFLARE_TURNSTILE_SITE_KEY"`- // testing Telegram- TestTelegramBotToken string `env:"TEST_TELEGRAM_BOT_TOKEN"`- TestTelegramChatID string `env:"TEST_TELEGRAM_CHAT_ID"`-// testing SupabaseTestSupabaseHost string `env:"TEST_SUPABASE_HOST"`TestSupabasePort string `env:"TEST_SUPABASE_PORT"`@@ -365,15 +361,6 @@ func loadEnvVariables() {os.Exit(1)}- if env.TestTelegramBotToken == "" {- log.Error("TEST_TELEGRAM_BOT_TOKEN is empty")- os.Exit(1)- }-- if env.TestTelegramChatID == "" {- log.Error("TEST_TELEGRAM_CHAT_ID is empty")- os.Exit(1)- }}log.Info("Environment variables loaded successfully!")diff --git a/backend/internal/features/notifiers/controller_test.go b/backend/internal/features/notifiers/controller_test.goindex 36c03733..964616ad 100644--- a/backend/internal/features/notifiers/controller_test.go+++ b/backend/internal/features/notifiers/controller_test.go@@ -9,7 +9,6 @@ import ("github.com/google/uuid""github.com/stretchr/testify/assert"- "databasus-backend/internal/config"audit_logs "databasus-backend/internal/features/audit_logs"discord_notifier "databasus-backend/internal/features/notifiers/models/discord"email_notifier "databasus-backend/internal/features/notifiers/models/email_notifier"@@ -159,7 +158,7 @@ func Test_SendTestNotificationDirect_NotificationSent(t *testing.T) {router := createRouter()workspace := workspaces_testing.CreateTestWorkspace("Test Workspace", owner, router)- notifier := createTelegramNotifier(workspace.ID)+ notifier := createWebhookNotifier(workspace.ID)response := test_utils.MakePostRequest(t, router, "/api/v1/notifiers/direct-test", "Bearer "+owner.Token, *notifier, http.StatusOK,@@ -174,7 +173,7 @@ func Test_SendTestNotificationExisting_NotificationSent(t *testing.T) {router := createRouter()workspace := workspaces_testing.CreateTestWorkspace("Test Workspace", owner, router)- notifier := createTelegramNotifier(workspace.ID)+ notifier := createWebhookNotifier(workspace.ID)var savedNotifier Notifiertest_utils.MakePostRequestAndUnmarshal(@@ -1252,15 +1251,14 @@ func createNewNotifier(workspaceID uuid.UUID) *Notifier {}}-func createTelegramNotifier(workspaceID uuid.UUID) *Notifier {- env := config.GetEnv()+func createWebhookNotifier(workspaceID uuid.UUID) *Notifier {return &Notifier{WorkspaceID: workspaceID,- Name: "Test Telegram Notifier " + uuid.New().String(),- NotifierType: NotifierTypeTelegram,- TelegramNotifier: &telegram_notifier.TelegramNotifier{- BotToken: env.TestTelegramBotToken,- TargetChatID: env.TestTelegramChatID,+ Name: "Test Webhook Notifier " + uuid.New().String(),+ NotifierType: NotifierTypeWebhook,+ WebhookNotifier: &webhook_notifier.WebhookNotifier{+ WebhookURL: "https://databasus.com",+ WebhookMethod: webhook_notifier.WebhookMethodGET,},}}