feat(alerting): Plan 01 — outbound HTTP infra + admin-managed outbound connections #139

Merged
hsiegeln merged 22 commits from feat/alerting-01-outbound-infra into main 2026-04-20 08:57:41 +02:00
2 changed files with 13 additions and 0 deletions
Showing only changes of commit 7358555d56 - Show all commits

View File

@@ -31,6 +31,12 @@ class OutboundConnectionAdminControllerIT extends AbstractPostgresIT {
if (wireMock != null) wireMock.stop();
}
@org.junit.jupiter.api.AfterEach
void cleanupRows() {
jdbcTemplate.update("DELETE FROM outbound_connections WHERE tenant_id = 'default'");
jdbcTemplate.update("DELETE FROM users WHERE user_id IN ('test-admin','test-operator','test-viewer')");
}
@BeforeEach
void setUp() {
adminJwt = securityHelper.adminToken();

View File

@@ -6,6 +6,7 @@ import com.cameleer.server.core.outbound.OutboundAuth;
import com.cameleer.server.core.outbound.OutboundConnection;
import com.cameleer.server.core.outbound.OutboundConnectionRepository;
import com.cameleer.server.core.outbound.OutboundMethod;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -34,6 +35,12 @@ class PostgresOutboundConnectionRepositoryIT extends AbstractPostgresIT {
jdbcTemplate.update("DELETE FROM outbound_connections WHERE tenant_id = ?", TENANT);
}
@AfterEach
void cleanup() {
jdbcTemplate.update("DELETE FROM outbound_connections WHERE created_by = ? OR updated_by = ?", USER, USER);
jdbcTemplate.update("DELETE FROM users WHERE user_id = ?", USER);
}
private OutboundConnection draft(String name) {
return new OutboundConnection(
UUID.randomUUID(), TENANT, name, "desc",