You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix environment tests, add cleanup, and remove security vulnerabilities
- Fix EnvironmentAPITest: Create environment before fetch test (Order 50)
- Add @afterall cleanup to delete test environments at end
- Fix TokenAPITest: Auto-create environment if missing for delivery tokens
- Remove all sensitive data from console logs (authtokens, API keys, tokens)
- Fix TaxonomyTest: Remove hardcoded credentials, use TestClient
- Fix AssetAPITest: Remove hardcoded folder UID and sensitive response logging
- Add TestStackSetup utility for programmatic prerequisite creation
- Add GlobalFieldRealAPITest, ContentTypeRealAPITest, EntryRealAPITest
- Add type safety warnings suppression (@SuppressWarnings)
- Update APISanityTestSuite to include new test classes
Security fixes:
- Removed authtoken logging in TokenAPITest
- Removed API_KEY logging in TokenAPITest
- Removed full response body logging (may contain tokens)
- Removed hardcoded stack API key and authtoken in TaxonomyTest
- Sanitized token UID logging (show only first 8 chars)
All tests now pass with 0 skipped (301 tests total)
"Expected at least 2 headers (api_key, authorization), got: " + request.headers().size());
52
60
Assertions.assertTrue(request.isHttps(), "always works on https");
53
61
Assertions.assertEquals("GET", request.method(), "works with GET call");
54
62
Assertions.assertEquals("https", request.url().scheme(), "the scheme should be https"); Assertions.assertEquals(443, request.url().port(), "port should be 443");
Assertions.assertTrue(request.isHttps(), "always works on https");
150
-
Assertions.assertEquals("POST", request.method(), "works with GET call");
159
+
Assertions.assertEquals("POST", request.method(), "works with POST call");
151
160
Assertions.assertEquals("https", request.url().scheme(), "the scheme should be https"); Assertions.assertEquals(443, request.url().port(), "port should be 443");
152
161
Assertions.assertTrue(request.url().pathSegments().contains("v3"), "the first segment of url should be v3");
153
162
Assertions.assertTrue(request.url().pathSegments().contains("assets"), "url segment should contain assets");
@@ -157,7 +166,6 @@ void testAssetUpload() {
157
166
}
158
167
159
168
@Test
160
-
@Disabled("disabled to avoid unnecessary asset creation, Tested working fine")
Assertions.assertTrue(resp.raw().request().isHttps(), "always works on https");
179
-
Assertions.assertEquals("PUT", resp.raw().request().method(), "works with GET call");
187
+
Assertions.assertEquals("PUT", resp.raw().request().method(), "works with PUT call");
180
188
Assertions.assertEquals("https", resp.raw().request().url().scheme(), "the scheme should be https"); Assertions.assertEquals(443, resp.raw().request().url().port(), "port should be 443");
Assertions.assertTrue(resp.raw().request().isHttps(), "always works on https");
206
-
Assertions.assertEquals("PUT", resp.raw().request().method(), "works with GET call");
207
-
Assertions.assertEquals("https", resp.raw().request().url().scheme(), "the scheme should be https"); Assertions.assertEquals(443, resp.raw().request().url().port(), "port should be 443");
0 commit comments