feat(alerting): Plan 01 — outbound HTTP infra + admin-managed outbound connections #139
@@ -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();
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user