You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2026/05/21 04:37:09 UTC
(unomi) 01/02: Revert "UNOMI-139: Fix TenantIT and EventsCollectorIT integration failures"
This is an automated email from the ASF dual-hosted git repository.
sergehuber pushed a commit to branch UNOMI-139-878-integration-tests
in repository https://gitbox.apache.org/repos/asf/unomi.git
commit 6a3cd59dfbdbc23fe43095fa6634257032897724
Author: Serge Huber <sh...@apache.org>
AuthorDate: Tue May 19 18:22:00 2026 +0200
Revert "UNOMI-139: Fix TenantIT and EventsCollectorIT integration failures"
This reverts commit 958d2fb2f6fecbc4de35addda302eb9f8927a237.
---
itests/src/test/java/org/apache/unomi/itests/TenantIT.java | 8 ++++----
.../java/org/apache/unomi/rest/models/EventCollectorResponse.java | 6 +-----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/itests/src/test/java/org/apache/unomi/itests/TenantIT.java b/itests/src/test/java/org/apache/unomi/itests/TenantIT.java
index 2c5035dc3..999dca531 100644
--- a/itests/src/test/java/org/apache/unomi/itests/TenantIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/TenantIT.java
@@ -239,12 +239,12 @@ public class TenantIT extends BaseIT {
try {
// Test without any authentication
String sessionId = "test-session-" + System.currentTimeMillis();
- try (CloseableHttpResponse response = executeHttpRequest(new HttpGet(getFullUrl("/cxs/context.json?sessionId=" + sessionId)), AuthType.NONE)) {
+ try (CloseableHttpResponse response = executeHttpRequest(new HttpGet(getFullUrl("/context.json?sessionId=" + sessionId)), AuthType.NONE)) {
Assert.assertEquals("Unauthenticated public request should be rejected", 401, response.getStatusLine().getStatusCode());
}
// Test with private API key (should succeed - private keys have higher privileges)
- HttpGet publicRequest = new HttpGet(getFullUrl("/cxs/context.json?sessionId=" + sessionId));
+ HttpGet publicRequest = new HttpGet(getFullUrl("/context.json?sessionId=" + sessionId));
publicRequest.setHeader("Authorization", "Basic " + Base64.getEncoder().encodeToString(
(tenant.getItemId() + ":" + tenant.getPrivateApiKey()).getBytes()));
try (CloseableHttpResponse response = executeHttpRequest(publicRequest, AuthType.PRIVATE_KEY)) {
@@ -252,7 +252,7 @@ public class TenantIT extends BaseIT {
}
// Test with valid public API key (should succeed)
- publicRequest = new HttpGet(getFullUrl("/cxs/context.json?sessionId=" + sessionId));
+ publicRequest = new HttpGet(getFullUrl("/context.json?sessionId=" + sessionId));
publicRequest.setHeader("X-Unomi-Api-Key", tenant.getPublicApiKey());
try (CloseableHttpResponse response = executeHttpRequest(publicRequest, AuthType.PUBLIC_KEY)) {
Assert.assertEquals("Valid public API key should grant access to public endpoints", 200, response.getStatusLine().getStatusCode());
@@ -583,7 +583,7 @@ public class TenantIT extends BaseIT {
// Test that context.json is properly detected as a public endpoint
// This test verifies that the AUTO authentication works correctly
String sessionId = "test-session-" + System.currentTimeMillis();
- try (CloseableHttpResponse response = executeHttpRequest(new HttpGet(getFullUrl("/cxs/context.json?sessionId=" + sessionId)), AuthType.AUTO)) {
+ try (CloseableHttpResponse response = executeHttpRequest(new HttpGet(getFullUrl("/context.json?sessionId=" + sessionId)), AuthType.AUTO)) {
// Should succeed with public key authentication
Assert.assertEquals("context.json should be accessible with auto-detected public authentication",
200, response.getStatusLine().getStatusCode());
diff --git a/rest/src/main/java/org/apache/unomi/rest/models/EventCollectorResponse.java b/rest/src/main/java/org/apache/unomi/rest/models/EventCollectorResponse.java
index c94ad2eac..b53b25d8e 100644
--- a/rest/src/main/java/org/apache/unomi/rest/models/EventCollectorResponse.java
+++ b/rest/src/main/java/org/apache/unomi/rest/models/EventCollectorResponse.java
@@ -17,16 +17,12 @@
package org.apache.unomi.rest.models;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
import java.io.Serializable;
public class EventCollectorResponse implements Serializable {
private int updated;
- @JsonCreator
- public EventCollectorResponse(@JsonProperty("updated") int updated) {
+ public EventCollectorResponse(int updated) {
this.updated = updated;
}