From 49df5203f1cf86a4e625594abaf3b043371dc96c Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Fri, 12 Apr 2024 17:10:25 +0530 Subject: [PATCH 1/8] added: surefire plugin to generate test reports --- pom.xml | 2 +- .../com/contentstack/sdk/marketplace/MarketplaceTest.java | 4 ++-- .../sdk/marketplace/installations/location/LocationTests.java | 2 +- .../sdk/marketplace/installations/webhook/WebhookTests.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 6ee6cdc..b989592 100644 --- a/pom.xml +++ b/pom.xml @@ -161,7 +161,7 @@ maven-surefire-plugin 3.0.0-M5 - true + ${project.build.directory}/surefire-reports true diff --git a/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java b/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java index dd1c499..9f8330d 100644 --- a/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java +++ b/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java @@ -36,7 +36,7 @@ void testConstructorWithNullOrganizationUidAndWithValidHost() { //String organizationUid = "nullOrganizationUid123"; String organizationUid = null; String host = "developerhub-api.contentstack.com"; - assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid) + assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid) .host(host) .build()); } @@ -63,7 +63,7 @@ void testConstructorWithNullOrganizationUid() { void testConstructorWithNullOrganizationUidNullCheck() { // Arrange String organizationUid = null; - assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid) + assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid) .build()); } diff --git a/src/test/java/com/contentstack/sdk/marketplace/installations/location/LocationTests.java b/src/test/java/com/contentstack/sdk/marketplace/installations/location/LocationTests.java index 831d255..4bc7f17 100644 --- a/src/test/java/com/contentstack/sdk/marketplace/installations/location/LocationTests.java +++ b/src/test/java/com/contentstack/sdk/marketplace/installations/location/LocationTests.java @@ -60,7 +60,7 @@ void testParamsAndHeaders() { Assertions.assertEquals(5, request.headers().size()); Assertions.assertEquals("api.contentstack.io", request.url().host()); Assertions.assertNull(request.body()); - Assertions.assertEquals("https://api.contentstack.io/installations/orgId999999999/locations/configuration?param1=value1", request.url().toString()); + Assertions.assertEquals("https://api.contentstack.io/installations/"+ ORG_UID +"/locations/configuration?param1=value1", request.url().toString()); } diff --git a/src/test/java/com/contentstack/sdk/marketplace/installations/webhook/WebhookTests.java b/src/test/java/com/contentstack/sdk/marketplace/installations/webhook/WebhookTests.java index 11a854f..37fde3d 100644 --- a/src/test/java/com/contentstack/sdk/marketplace/installations/webhook/WebhookTests.java +++ b/src/test/java/com/contentstack/sdk/marketplace/installations/webhook/WebhookTests.java @@ -111,7 +111,7 @@ void testParamsAndHeaders() { Assertions.assertEquals(5, request.headers().size()); Assertions.assertEquals("api.contentstack.io", request.url().host()); Assertions.assertNull(request.body()); - Assertions.assertEquals("https://api.contentstack.io/installations/installation_id/webhooks/orgId999999999/executions?limit=10&skip=5&sort=asc&order=order", request.url().toString()); + Assertions.assertEquals("https://api.contentstack.io/installations/installation_id/webhooks/" + WEBHOOK_ID + "/executions?limit=10&skip=5&sort=asc&order=order", request.url().toString()); } From e640ad4ed9ae4c64cfce5122e5d6cb13c071ec29 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Fri, 12 Apr 2024 17:52:13 +0530 Subject: [PATCH 2/8] added: updated the version and changelog.md --- changelog.md | 13 +++++++++++++ pom.xml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 changelog.md diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..d75ea19 --- /dev/null +++ b/changelog.md @@ -0,0 +1,13 @@ +# Changelog + +A brief description of what changes project contains + +#### v1.0.1 + +- added surefire plugin to generate test report + +## Introducing Release Of Java Marketplace SDK + +#### v1.0.0 + +- Initial release for Marketplace SDK \ No newline at end of file diff --git a/pom.xml b/pom.xml index b989592..06a0b99 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.contentstack.sdk marketplace - 1.0.0 + 1.0.1 Contentstack Java Management SDK for Content Management API https://github.com/contentstack/contentstack-management-java/ From d02fa671a806fc948c5670b7e7eaf3397bc85b51 Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Thu, 6 Jun 2024 16:07:26 +0530 Subject: [PATCH 3/8] feat: added gcp_na support --- src/main/java/com/contentstack/sdk/Region.java | 4 ++++ src/test/java/com/contentstack/sdk/TestClient.java | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/main/java/com/contentstack/sdk/Region.java b/src/main/java/com/contentstack/sdk/Region.java index 80f16c8..3842f38 100644 --- a/src/main/java/com/contentstack/sdk/Region.java +++ b/src/main/java/com/contentstack/sdk/Region.java @@ -25,4 +25,8 @@ public enum Region { * Azure na region. */ AZURE_NA, + /** + * Gcp na region. + */ + GCP_NA, } diff --git a/src/test/java/com/contentstack/sdk/TestClient.java b/src/test/java/com/contentstack/sdk/TestClient.java index 760b619..f8ab55c 100644 --- a/src/test/java/com/contentstack/sdk/TestClient.java +++ b/src/test/java/com/contentstack/sdk/TestClient.java @@ -47,6 +47,14 @@ public static Marketplace getMarketplaceAzureEu() { .build(); } + public static Marketplace getMarketplaceGcpNa() { + return new Marketplace + .Builder(TestClient.ORGANIZATION_UID) + .host(HOST) + .region(Region.GCP_NA) + .build(); + } + public static Marketplace getMarketplaceWithLogin() { return new Marketplace From 2ccd7bf24ef412851b510a5b1ae5fc369eab72a9 Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Thu, 6 Jun 2024 16:16:08 +0530 Subject: [PATCH 4/8] chore: version bump to 1.1.0 --- changelog.md | 4 ++-- pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index d75ea19..08a82cb 100644 --- a/changelog.md +++ b/changelog.md @@ -2,9 +2,9 @@ A brief description of what changes project contains -#### v1.0.1 +#### v1.1.0 -- added surefire plugin to generate test report +- added GCP_NA region support ## Introducing Release Of Java Marketplace SDK diff --git a/pom.xml b/pom.xml index 06a0b99..751440a 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ https://github.com/contentstack/contentstack-management-java/ - 1.0.0 + 1.1.0 9 9 UTF-8 From c376bb538c00a0154485048e3ed81b312212379f Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Thu, 6 Jun 2024 17:08:08 +0530 Subject: [PATCH 5/8] updated retrofit-source package --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 751440a..5f8a00c 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 3.0.0 5.2.2 3.1.6 - 2.9.0 + 2.10.0 2.9.0 4.10.0 0.8.7 From 46bcafd6b29843a73d3b9708eab34b079658f7f8 Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Thu, 6 Jun 2024 17:13:41 +0530 Subject: [PATCH 6/8] snyk upgrades --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 5f8a00c..5db6b52 100644 --- a/pom.xml +++ b/pom.xml @@ -20,10 +20,10 @@ 5.2.2 3.1.6 2.10.0 - 2.9.0 + 2.10.0 4.10.0 0.8.7 - 1.18.30 + 1.18.32 5.10.0 5.8.0-M1 5.10.0 @@ -117,7 +117,7 @@ org.jetbrains annotations - 24.0.1 + 24.1.0 provided From 5b46ec7c2cbbb21e72d711a80c33351af3015e8e Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Thu, 6 Jun 2024 17:26:20 +0530 Subject: [PATCH 7/8] updated test cases --- .../com/contentstack/sdk/marketplace/MarketplaceTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java b/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java index 9f8330d..dd1c499 100644 --- a/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java +++ b/src/test/java/com/contentstack/sdk/marketplace/MarketplaceTest.java @@ -36,7 +36,7 @@ void testConstructorWithNullOrganizationUidAndWithValidHost() { //String organizationUid = "nullOrganizationUid123"; String organizationUid = null; String host = "developerhub-api.contentstack.com"; - assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid) + assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid) .host(host) .build()); } @@ -63,7 +63,7 @@ void testConstructorWithNullOrganizationUid() { void testConstructorWithNullOrganizationUidNullCheck() { // Arrange String organizationUid = null; - assertThrows(NullPointerException.class, () -> new Marketplace.Builder(organizationUid) + assertThrows(IllegalArgumentException.class, () -> new Marketplace.Builder(organizationUid) .build()); } From 724201100a9f0523a0bbf1e1b0e8979f05b861c2 Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Tue, 11 Jun 2024 16:54:05 +0530 Subject: [PATCH 8/8] License update to 2024 --- LICENSE | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 981ba26..d77c7f4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2012 - 2023 Contentstack +Copyright (c) 2012 - 2024 Contentstack Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index cad4ab6..71819c9 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ AppRequest appRequest = marketplace.request(); The MIT License (MIT) -Copyright © 2012-2023 [Contentstack](https://www.contentstack.com/). All Rights Reserved +Copyright © 2012-2024 [Contentstack](https://www.contentstack.com/). All Rights Reserved Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: