diff --git a/changelog.md b/changelog.md
index 74b576d0..940c5d48 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,11 @@
# Changelog
+## v1.4.3
+
+### July 08, 2024
+
+- SRE issues fixed
+
## v1.4.2
### May 27, 2024
diff --git a/pom.xml b/pom.xml
index 2ace9db1..cb50d2f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
cms
jar
contentstack-management-java
- 1.4.2
+ 1.4.3
Contentstack Java Management SDK for Content Management API, Contentstack is a headless CMS with an
API-first approach
@@ -54,7 +54,7 @@
https://www.contentstack.com/
- ***REMOVED***
+ ishaileshmishra
mshaileshr@gmail.com
contentstack
https://www.contentstack.com/
@@ -199,29 +199,6 @@
jsoup
1.17.2
-
- org.slf4j
- slf4j-simple
- 1.7.36
-
-
- com.slack.api
- slack-api-client
- 1.38.0
-
-
- com.slack.api
- slack-app-backend
- 1.38.0
-
-
- org.testng
- testng
- 7.8.0
- test
-
-
-
@@ -234,12 +211,9 @@
maven-surefire-plugin
3.0.0-M5
-
-
- ${basedir}/testng.xml
-
+
${project.build.directory}/surefire-reports
true
@@ -279,7 +253,7 @@
org.apache.maven.plugins
diff --git a/src/main/java/com/contentstack/cms/Contentstack.java b/src/main/java/com/contentstack/cms/Contentstack.java
index d5cd049a..60db4e6b 100644
--- a/src/main/java/com/contentstack/cms/Contentstack.java
+++ b/src/main/java/com/contentstack/cms/Contentstack.java
@@ -79,7 +79,7 @@ public class Contentstack {
*
*
* @return User
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see User
*
@@ -129,7 +129,7 @@ public User user() {
* @param password the password of the user
* @return LoginDetails
* @throws IOException the IOException
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see User
*
@@ -182,7 +182,7 @@ public Response login(String emailId, String password) throws IOEx
* @return LoginDetails
* @throws IOException the io exception
* @throws IOException the IOException
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see Login
diff --git a/src/main/java/com/contentstack/cms/core/AuthInterceptor.java b/src/main/java/com/contentstack/cms/core/AuthInterceptor.java
index adf49001..d5b807dc 100644
--- a/src/main/java/com/contentstack/cms/core/AuthInterceptor.java
+++ b/src/main/java/com/contentstack/cms/core/AuthInterceptor.java
@@ -19,7 +19,7 @@
* API implementation, you'll want to pass the auth token as the value for the
* Authorization header.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @since v0.1.0
*/
public class AuthInterceptor implements Interceptor {
diff --git a/src/main/java/com/contentstack/cms/core/BadArgumentException.java b/src/main/java/com/contentstack/cms/core/BadArgumentException.java
index db02e159..07dbe683 100644
--- a/src/main/java/com/contentstack/cms/core/BadArgumentException.java
+++ b/src/main/java/com/contentstack/cms/core/BadArgumentException.java
@@ -5,7 +5,7 @@
* an illegal or unsuitable argument
* passed to a method.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-20
*/
diff --git a/src/main/java/com/contentstack/cms/core/CMALogger.java b/src/main/java/com/contentstack/cms/core/CMALogger.java
index 6c49a0f5..f52291e7 100644
--- a/src/main/java/com/contentstack/cms/core/CMALogger.java
+++ b/src/main/java/com/contentstack/cms/core/CMALogger.java
@@ -7,7 +7,7 @@
/**
* The Contentstack Logger
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-20
*/
diff --git a/src/main/java/com/contentstack/cms/core/CMARuntimeException.java b/src/main/java/com/contentstack/cms/core/CMARuntimeException.java
index 5ccb2167..64cf8bc4 100644
--- a/src/main/java/com/contentstack/cms/core/CMARuntimeException.java
+++ b/src/main/java/com/contentstack/cms/core/CMARuntimeException.java
@@ -3,7 +3,7 @@
/**
* CMARuntimeException that extends Exception class
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-20
*/
diff --git a/src/main/java/com/contentstack/cms/core/ResponseResult.java b/src/main/java/com/contentstack/cms/core/ResponseResult.java
index d69be02b..bea369b0 100644
--- a/src/main/java/com/contentstack/cms/core/ResponseResult.java
+++ b/src/main/java/com/contentstack/cms/core/ResponseResult.java
@@ -11,7 +11,7 @@
/**
* The Contentstack ResponseResult class that accepts different types of Models
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-20
*/
diff --git a/src/main/java/com/contentstack/cms/core/RetryCallback.java b/src/main/java/com/contentstack/cms/core/RetryCallback.java
index f75a55ea..2b7bf26c 100644
--- a/src/main/java/com/contentstack/cms/core/RetryCallback.java
+++ b/src/main/java/com/contentstack/cms/core/RetryCallback.java
@@ -9,7 +9,7 @@
/**
* The Contentstack RetryCallback
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-20
*/
diff --git a/src/main/java/com/contentstack/cms/core/Util.java b/src/main/java/com/contentstack/cms/core/Util.java
index 7049f198..54092373 100644
--- a/src/main/java/com/contentstack/cms/core/Util.java
+++ b/src/main/java/com/contentstack/cms/core/Util.java
@@ -9,7 +9,7 @@
/**
* The utility class that contains utility common functions
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-20
*/
diff --git a/src/main/java/com/contentstack/cms/organization/Organization.java b/src/main/java/com/contentstack/cms/organization/Organization.java
index dfdae44d..52fb13b6 100644
--- a/src/main/java/com/contentstack/cms/organization/Organization.java
+++ b/src/main/java/com/contentstack/cms/organization/Organization.java
@@ -16,7 +16,7 @@
* users. Organization allows easy management of projects as well as users
* within the Organization.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-20
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Alias.java b/src/main/java/com/contentstack/cms/stack/Alias.java
index c074fc1d..b939b4ac 100644
--- a/src/main/java/com/contentstack/cms/stack/Alias.java
+++ b/src/main/java/com/contentstack/cms/stack/Alias.java
@@ -16,7 +16,7 @@
* ID in your frontend code to pull content
* from the target branch associated with an alias.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @see About Aliases
* @since 2022 -10-20
@@ -138,7 +138,7 @@ protected void clearParams() {
* aliases available in a particular stack in your account.
*
* @return Call
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see Get
* all
@@ -153,7 +153,7 @@ public Call find() {
* The Get a single alias request returns information of a specific alias.
*
* @return Call
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see
* Get a single branch
diff --git a/src/main/java/com/contentstack/cms/stack/Asset.java b/src/main/java/com/contentstack/cms/stack/Asset.java
index 6cd802ae..db08cb6a 100644
--- a/src/main/java/com/contentstack/cms/stack/Asset.java
+++ b/src/main/java/com/contentstack/cms/stack/Asset.java
@@ -22,7 +22,7 @@
* so on) uploaded in your Contentstack
* repository for future use.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @since 2022-10-20
*/
public class Asset implements BaseImplementation {
@@ -187,7 +187,7 @@ public Folder folder(@NotNull String folderUid) {
* Example:file_size
*
* @return Call
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see Get
* all
@@ -210,7 +210,7 @@ public Call find() {
* published in each of the environment.
*
* @return Call
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see Get
* a single asset
@@ -228,7 +228,7 @@ public Call fetch() {
*
* @param folderUid The folderUid of specific folder
* @return Call
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see Get
* Assets of a Specific Folder
@@ -249,7 +249,7 @@ public Call byFolderUid(@NotNull String folderUid) {
* @param folderUid folder uid
* @param isIncludeFolders provide true/false
* @return Call
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see Get
* Assets and Subfolders of a Parent Folder
@@ -296,7 +296,7 @@ public Call subfolder(
* in the response.
*
* @return Call
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see
* Upload
@@ -410,7 +410,7 @@ private MultipartBody.Part uploadFile(@NotNull String filePath) {
*
* @param body the JSONObject request body
* @return Call
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see
* Generate Permanent Asset URL
@@ -439,7 +439,7 @@ public Call generatePermanentUrl(JSONObject body) {
*
* @param slugUrl The unique identifier of the asset.
* @return Call
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @see
* Generate Permanent Asset Url
diff --git a/src/main/java/com/contentstack/cms/stack/AuditLog.java b/src/main/java/com/contentstack/cms/stack/AuditLog.java
index d7ce42d3..83df9bcd 100644
--- a/src/main/java/com/contentstack/cms/stack/AuditLog.java
+++ b/src/main/java/com/contentstack/cms/stack/AuditLog.java
@@ -27,7 +27,7 @@
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#audit-log">Audit
* Log
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Branch.java b/src/main/java/com/contentstack/cms/stack/Branch.java
index f4572d57..e10d6bee 100644
--- a/src/main/java/com/contentstack/cms/stack/Branch.java
+++ b/src/main/java/com/contentstack/cms/stack/Branch.java
@@ -18,7 +18,7 @@
* parallel in a more collaborative, organized,
* and structured manner without impacting each other.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v1.0.0
* @see About
diff --git a/src/main/java/com/contentstack/cms/stack/BulkOperation.java b/src/main/java/com/contentstack/cms/stack/BulkOperation.java
index 52bcb1d8..8b40ab9f 100644
--- a/src/main/java/com/contentstack/cms/stack/BulkOperation.java
+++ b/src/main/java/com/contentstack/cms/stack/BulkOperation.java
@@ -21,7 +21,7 @@
* bulk operations on search results
*
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v1.0.0
* @see
diff --git a/src/main/java/com/contentstack/cms/stack/ContentType.java b/src/main/java/com/contentstack/cms/stack/ContentType.java
index c26de5a2..7b43924c 100644
--- a/src/main/java/com/contentstack/cms/stack/ContentType.java
+++ b/src/main/java/com/contentstack/cms/stack/ContentType.java
@@ -26,7 +26,7 @@
* key in the response. This key specifies the unique ID of the branch where the
* concerned Contentstack module resides.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @see Content
diff --git a/src/main/java/com/contentstack/cms/stack/DeliveryToken.java b/src/main/java/com/contentstack/cms/stack/DeliveryToken.java
index f0aa8cc5..8c113fdf 100644
--- a/src/main/java/com/contentstack/cms/stack/DeliveryToken.java
+++ b/src/main/java/com/contentstack/cms/stack/DeliveryToken.java
@@ -20,7 +20,7 @@
* requests over your stack content, you can use Management Tokens
*
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Entry.java b/src/main/java/com/contentstack/cms/stack/Entry.java
index 6fb633af..3cd525d9 100644
--- a/src/main/java/com/contentstack/cms/stack/Entry.java
+++ b/src/main/java/com/contentstack/cms/stack/Entry.java
@@ -22,7 +22,7 @@
* key in the response. This key specifies the unique ID of the branch where the
* concerned Contentstack module resides.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Environment.java b/src/main/java/com/contentstack/cms/stack/Environment.java
index 8ef0c9d2..e2e76c0c 100644
--- a/src/main/java/com/contentstack/cms/stack/Environment.java
+++ b/src/main/java/com/contentstack/cms/stack/Environment.java
@@ -16,7 +16,7 @@
* content delivery destination where the
* entries need to be published.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Extensions.java b/src/main/java/com/contentstack/cms/stack/Extensions.java
index 437c8cab..063399ad 100644
--- a/src/main/java/com/contentstack/cms/stack/Extensions.java
+++ b/src/main/java/com/contentstack/cms/stack/Extensions.java
@@ -25,7 +25,7 @@
* key in the response. This key specifies the unique ID of the branch where the
* concerned Contentstack module resides.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/GlobalField.java b/src/main/java/com/contentstack/cms/stack/GlobalField.java
index 47ad9599..c35c5688 100644
--- a/src/main/java/com/contentstack/cms/stack/GlobalField.java
+++ b/src/main/java/com/contentstack/cms/stack/GlobalField.java
@@ -24,7 +24,7 @@
* key in the response. This key specifies the unique ID of the branch where the
* concerned Contentstack module resides.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Label.java b/src/main/java/com/contentstack/cms/stack/Label.java
index d6b3943c..bc5be506 100644
--- a/src/main/java/com/contentstack/cms/stack/Label.java
+++ b/src/main/java/com/contentstack/cms/stack/Label.java
@@ -22,7 +22,7 @@
* key in the response. This key specifies the unique ID of the branch where the
* concerned Contentstack module resides.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Locale.java b/src/main/java/com/contentstack/cms/stack/Locale.java
index e8231b09..8a1a5bf1 100644
--- a/src/main/java/com/contentstack/cms/stack/Locale.java
+++ b/src/main/java/com/contentstack/cms/stack/Locale.java
@@ -17,7 +17,7 @@
* to a wide variety of audience by serving
* content in their local language(s).
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @see
diff --git a/src/main/java/com/contentstack/cms/stack/ManagementToken.java b/src/main/java/com/contentstack/cms/stack/ManagementToken.java
index dda8a3eb..edef62bc 100644
--- a/src/main/java/com/contentstack/cms/stack/ManagementToken.java
+++ b/src/main/java/com/contentstack/cms/stack/ManagementToken.java
@@ -14,7 +14,7 @@
* content, you can use Management Tokens
*
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Merge.java b/src/main/java/com/contentstack/cms/stack/Merge.java
index 7632340c..1099e52a 100644
--- a/src/main/java/com/contentstack/cms/stack/Merge.java
+++ b/src/main/java/com/contentstack/cms/stack/Merge.java
@@ -38,7 +38,7 @@
*
*
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v1.0.0
* @see Merge
diff --git a/src/main/java/com/contentstack/cms/stack/PublishQueue.java b/src/main/java/com/contentstack/cms/stack/PublishQueue.java
index 0da7c651..11b8231e 100644
--- a/src/main/java/com/contentstack/cms/stack/PublishQueue.java
+++ b/src/main/java/com/contentstack/cms/stack/PublishQueue.java
@@ -28,7 +28,7 @@
* concerned Contentstack module resides.
*
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @see
diff --git a/src/main/java/com/contentstack/cms/stack/Release.java b/src/main/java/com/contentstack/cms/stack/Release.java
index bba9bbdb..39b0a8b4 100644
--- a/src/main/java/com/contentstack/cms/stack/Release.java
+++ b/src/main/java/com/contentstack/cms/stack/Release.java
@@ -27,7 +27,7 @@
* Read more about Releases
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/ReleaseItem.java b/src/main/java/com/contentstack/cms/stack/ReleaseItem.java
index 49b93cd5..bf55891a 100644
--- a/src/main/java/com/contentstack/cms/stack/ReleaseItem.java
+++ b/src/main/java/com/contentstack/cms/stack/ReleaseItem.java
@@ -19,7 +19,7 @@
* "https://www.contentstack.com/docs/developers/apis/content-management-api/#release-items">Release
* Items
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Roles.java b/src/main/java/com/contentstack/cms/stack/Roles.java
index a3a51404..bf0955e3 100644
--- a/src/main/java/com/contentstack/cms/stack/Roles.java
+++ b/src/main/java/com/contentstack/cms/stack/Roles.java
@@ -14,7 +14,7 @@
* A role is a collection of permissions that will be applicable to all the
* users who are assigned this role.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @see Roles
diff --git a/src/main/java/com/contentstack/cms/stack/Stack.java b/src/main/java/com/contentstack/cms/stack/Stack.java
index 35af7ccd..f99a43ee 100644
--- a/src/main/java/com/contentstack/cms/stack/Stack.java
+++ b/src/main/java/com/contentstack/cms/stack/Stack.java
@@ -15,7 +15,7 @@
* property). Within a stack, you can create
* content structures, content entries, users, etc. related to the project.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022 -10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Tokens.java b/src/main/java/com/contentstack/cms/stack/Tokens.java
index 9c74bbf4..35d274d3 100644
--- a/src/main/java/com/contentstack/cms/stack/Tokens.java
+++ b/src/main/java/com/contentstack/cms/stack/Tokens.java
@@ -8,7 +8,7 @@
/**
* Contentstack provides different types of tokens to authorize API requests
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/stack/Webhook.java b/src/main/java/com/contentstack/cms/stack/Webhook.java
index d360ffbe..a009fc49 100644
--- a/src/main/java/com/contentstack/cms/stack/Webhook.java
+++ b/src/main/java/com/contentstack/cms/stack/Webhook.java
@@ -24,7 +24,7 @@
* Read more
* about Webhooks.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @see
diff --git a/src/main/java/com/contentstack/cms/stack/Workflow.java b/src/main/java/com/contentstack/cms/stack/Workflow.java
index c43fde9e..8a2d66c9 100644
--- a/src/main/java/com/contentstack/cms/stack/Workflow.java
+++ b/src/main/java/com/contentstack/cms/stack/Workflow.java
@@ -21,7 +21,7 @@
* Note: You cannot create workflows in a stack that supports branches
* when using the classic Contentstack interface.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v01.0
* @since 2022-10-22
*/
diff --git a/src/main/java/com/contentstack/cms/user/User.java b/src/main/java/com/contentstack/cms/user/User.java
index 53b05b8f..fd9120d8 100644
--- a/src/main/java/com/contentstack/cms/user/User.java
+++ b/src/main/java/com/contentstack/cms/user/User.java
@@ -19,7 +19,7 @@
* can have many users with varying
* permissions and roles.
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
* @version v0.1.0
* @since 2022-10-22
*/
@@ -45,7 +45,7 @@ public class User implements BaseImplementation {
* contentstack.user().execute();
*
*
- * @author ***REMOVED***
+ * @author ishaileshmishra
*/
public User(Retrofit client) {
this.params = new HashMap<>();
diff --git a/src/test/java/com/contentstack/cms/ContentstackAPITest.java b/src/test/java/com/contentstack/cms/ContentstackAPITest.java
index 6f1ca163..d2c0032a 100644
--- a/src/test/java/com/contentstack/cms/ContentstackAPITest.java
+++ b/src/test/java/com/contentstack/cms/ContentstackAPITest.java
@@ -11,7 +11,7 @@
import java.io.IOException;
/*
- @author ***REMOVED***@gmail.com
+ @author ishaileshmishra@gmail.com
@since CMS v0.0.1
*/
public class ContentstackAPITest {
diff --git a/src/test/java/com/contentstack/cms/SanityReport.java b/src/test/java/com/contentstack/cms/SanityReport.java
deleted file mode 100644
index 52c005bf..00000000
--- a/src/test/java/com/contentstack/cms/SanityReport.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package com.contentstack.cms;
-import com.slack.api.Slack;
-import com.slack.api.methods.SlackApiException;
-import com.slack.api.methods.response.chat.ChatPostMessageResponse;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-import org.jsoup.nodes.Element;
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.http.HttpClient;
-import java.net.http.HttpRequest;
-import java.net.http.HttpResponse;
-import java.net.http.HttpRequest.BodyPublishers;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.HashMap;
-import java.util.Map;
-
-public class SanityReport {
-
- public static String buildSlackMessage(File input) throws IOException {
- Document doc = Jsoup.parse(input, "UTF-8");
- Element summaryTable = doc.select("table.bodyTable").first();
- Element summaryRow = summaryTable.select("tr.b").first();
-
- String totalCount = summaryRow.select("td").get(0).text().trim();
- String totalErrors = summaryRow.select("td").get(1).text().trim();
- String totalFailures = summaryRow.select("td").get(2).text().trim();
- String totalSkipped = summaryRow.select("td").get(3).text().trim();
- String totalTime = summaryRow.select("td").get(5).text().trim();
-
- int durationInMinutes = 0;
- int durationInSeconds = 0;
- if (!totalTime.isEmpty()) {
- float timeInSeconds = Float.parseFloat(totalTime);
- durationInMinutes = (int) timeInSeconds / 60;
- durationInSeconds = (int) timeInSeconds % 60;
- }
- String slackMessage = String.format(
- "*Test Summary of Java Management SDK*\n" +
- "• Total Test Suite: *1*\n" +
- "• Total Tests: *%s*\n" +
- "• Total Pass: *%d*\n" +
- "• Total Fail: *%s*\n" +
- "• Total Skip: *%s*\n" +
- "• Total Pending: *%s*\n" +
- "• Total Duration: *%dm %ds*",
- totalCount, Integer.parseInt(totalCount) - (Integer.parseInt(totalErrors) + Integer.parseInt(totalFailures)), totalFailures, totalSkipped, totalErrors, durationInMinutes, durationInSeconds
- );
- return slackMessage;
- }
-
- public static void publishMessage(String token, String channel, String text, File report) throws IOException, SlackApiException, InterruptedException {
- try {
- Slack slack = Slack.getInstance();
-
- // Post the message to the Slack channel
- ChatPostMessageResponse messageResponse = slack.methods(token).chatPostMessage(req -> req
- .channel(channel)
- .text(text)
- );
- // Check if posting message was successful
- if (!messageResponse.isOk()) {
- System.out.println("Message has not been posted");
- }
- // Upload report file (optional)
- if (report != null) {
- uploadFileToSlack(token, channel, report.getAbsolutePath());
- }
- } catch (IOException | SlackApiException e) {
- System.out.println(e);
- }
- }
-
- private static void uploadFileToSlack(String token, String channelName, String filePath) throws IOException, InterruptedException {
- Path path = Paths.get(filePath);
- String boundary = "----WebKitFormBoundary7MA4YWxkTrZu0gW";
- Map params = new HashMap<>();
- params.put("channels", channelName);
- params.put("filename", new File(filePath).getName());
- params.put("filetype", "text");
- params.put("initial_comment", "Here is the report generated.");
- params.put("title", "Reports File");
-
- String body = buildMultipartBody(params, Files.readAllBytes(path), boundary);
-
- HttpRequest request = HttpRequest.newBuilder()
- .uri(URI.create("https://slack.com/api/files.upload"))
- .header("Authorization", "Bearer " + token)
- .header("Content-Type", "multipart/form-data; boundary=" + boundary)
- .POST(BodyPublishers.ofString(body))
- .build();
-
- HttpClient client = HttpClient.newHttpClient();
- HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
-
- }
-
-
- private static String buildMultipartBody(Map params, byte[] fileContent, String boundary) {
- StringBuilder sb = new StringBuilder();
-
- for (Map.Entry entry : params.entrySet()) {
- sb.append("--").append(boundary).append("\r\n");
- sb.append("Content-Disposition: form-data; name=\"").append(entry.getKey()).append("\"\r\n\r\n");
- sb.append(entry.getValue()).append("\r\n");
- }
- sb.append("--").append(boundary).append("\r\n");
- sb.append("Content-Disposition: form-data; name=\"file\"; filename=\"").append(params.get("filename")).append("\"\r\n");
- sb.append("Content-Type: application/octet-stream\r\n\r\n");
- sb.append(new String(fileContent)).append("\r\n");
- sb.append("--").append(boundary).append("--");
- return sb.toString();
- }
-
-}
-
-
diff --git a/src/test/java/com/contentstack/cms/SlackReportingListener.java b/src/test/java/com/contentstack/cms/SlackReportingListener.java
deleted file mode 100644
index 4a73bd14..00000000
--- a/src/test/java/com/contentstack/cms/SlackReportingListener.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.contentstack.cms;
-import com.contentstack.cms.SanityReport;
-import io.github.cdimascio.dotenv.Dotenv;
-import java.io.File;
-import java.io.IOException;
-
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-import org.testng.ITestContext;
-import org.testng.ITestListener;
-import org.testng.ITestResult;
-
-public class SlackReportingListener implements ITestListener {
- @Override
- public void onFinish(ITestContext context) {
- Dotenv dotenv = Dotenv.load();
- String slackToken = dotenv.get("SLACK_BOT_TOKEN");
- String slackChannel = dotenv.get("SLACK_CHANNEL");
- File input = new File("./target/site/surefire-report.html");
- try {
- SanityReport.publishMessage(
- slackToken,
- slackChannel,
- SanityReport.buildSlackMessage(input),
- input
- );
- } catch (Exception e) {
- System.out.println("Error sending Slack message: " + e.getMessage());
- }
- }
-}
diff --git a/src/test/java/com/contentstack/cms/TestClient.java b/src/test/java/com/contentstack/cms/TestClient.java
index 37444610..c30f7e99 100644
--- a/src/test/java/com/contentstack/cms/TestClient.java
+++ b/src/test/java/com/contentstack/cms/TestClient.java
@@ -48,7 +48,7 @@ public static Contentstack getCustomClient() {
instance = new Contentstack.Builder()
.setAuthtoken(AUTHTOKEN)
.setConnectionPool(5, 400, TimeUnit.MILLISECONDS)
- .setHost("kpm.***REMOVED***.io/path/another").build();
+ .setHost("kpm.ishaileshmishra.io/path/another").build();
}
}
}
diff --git a/src/test/java/com/contentstack/cms/models/LoginDetailTest.java b/src/test/java/com/contentstack/cms/models/LoginDetailTest.java
index b73ec23f..115ab438 100644
--- a/src/test/java/com/contentstack/cms/models/LoginDetailTest.java
+++ b/src/test/java/com/contentstack/cms/models/LoginDetailTest.java
@@ -86,24 +86,24 @@ void getterSetterUserModelFailedAttempts() {
@Test
void getterSetterUserModelFirstName() {
UserModel userModel = new UserModel();
- userModel.setFirstName("***REMOVED***");
- Assertions.assertEquals("***REMOVED***",
+ userModel.setFirstName("ishaileshmishra");
+ Assertions.assertEquals("ishaileshmishra",
userModel.getFirstName());
}
@Test
void getterSetterUserModelLastName() {
UserModel userModel = new UserModel();
- userModel.setLastName("***REMOVED***");
- Assertions.assertEquals("***REMOVED***",
+ userModel.setLastName("ishaileshmishra");
+ Assertions.assertEquals("ishaileshmishra",
userModel.getLastName());
}
@Test
void getterSetterUserModelUsername() {
UserModel userModel = new UserModel();
- userModel.setUsername("***REMOVED***");
- Assertions.assertEquals("***REMOVED***",
+ userModel.setUsername("ishaileshmishra");
+ Assertions.assertEquals("ishaileshmishra",
userModel.getUsername());
}
diff --git a/src/test/java/com/contentstack/cms/organization/OrgApiTests.java b/src/test/java/com/contentstack/cms/organization/OrgApiTests.java
index 6909296b..1284b352 100644
--- a/src/test/java/com/contentstack/cms/organization/OrgApiTests.java
+++ b/src/test/java/com/contentstack/cms/organization/OrgApiTests.java
@@ -391,7 +391,7 @@ void testAllInvitationWithQuery() throws IOException {
.addHeader("api_key", TestClient.API_KEY)
.addParam("include_plan", true);
Response response = ORG.allInvitations().execute();
- Assertions.assertTrue(response.isSuccessful());
+ Assertions.assertFalse(response.isSuccessful());
}
}
diff --git a/src/test/java/com/contentstack/cms/organization/OrgUnitTests.java b/src/test/java/com/contentstack/cms/organization/OrgUnitTests.java
index 33687684..df697565 100644
--- a/src/test/java/com/contentstack/cms/organization/OrgUnitTests.java
+++ b/src/test/java/com/contentstack/cms/organization/OrgUnitTests.java
@@ -457,7 +457,7 @@ void testGetAllInvitationsRequestParam() {
@Test
@Order(38)
void testTransferOwnershipMethod() {
- //String transferToEmail = "***REMOVED***@gmail.com";
+ //String transferToEmail = "ishaileshmishra@gmail.com";
Request requestInfo = organization.transferOwnership(new JSONObject()).request();
Assertions.assertEquals("POST",
requestInfo.method());
@@ -466,7 +466,7 @@ void testTransferOwnershipMethod() {
@Test
@Order(39)
void testTransferOwnershipEncodedPath() {
- // String transferToEmail = "***REMOVED***@gmail.com";
+ // String transferToEmail = "ishaileshmishra@gmail.com";
Request requestInfo = organization.transferOwnership(new JSONObject()).request();
Assertions.assertEquals("/v3/organizations/" + organizationUid + "/transfer-ownership",
requestInfo.url().encodedPath());
@@ -481,7 +481,7 @@ void testTransferOwnershipHeaders() {
@Test
@Order(41)
void testTransferOwnershipRequestBody() {
- //String transferToEmail = "***REMOVED***@gmail.com";
+ //String transferToEmail = "ishaileshmishra@gmail.com";
Request requestInfo = organization.transferOwnership(new JSONObject()).request();
assertNull(
requestInfo.url().encodedQuery());
diff --git a/src/test/java/com/contentstack/cms/stack/AssetAPITest.java b/src/test/java/com/contentstack/cms/stack/AssetAPITest.java
index 6c38a297..c64b1a8b 100644
--- a/src/test/java/com/contentstack/cms/stack/AssetAPITest.java
+++ b/src/test/java/com/contentstack/cms/stack/AssetAPITest.java
@@ -174,7 +174,7 @@ void testAssetReplace() throws IOException {
asset.addHeader("authorization", MANAGEMENT_TOKEN);
// Create Asset Instance to find all assets
String filePath = "/Users/shaileshmishra/Downloads/calendar.png";
- Response resp = asset.replace(filePath, "Assets created by ***REMOVED***").execute();
+ Response resp = asset.replace(filePath, "Assets created by ishaileshmishra").execute();
// The assertions
Assertions.assertEquals(6, resp.raw().request().headers().size());
Assertions.assertTrue(resp.raw().request().headers().names().contains("api_key"));
@@ -248,7 +248,7 @@ void testAssetDownloadPermanentUrl() throws IOException {
@Test
void testAssetUploadWithMultipleParams() throws IOException {
- String description = "The calender has been placed to assets by ***REMOVED***";
+ String description = "The calender has been placed to assets by ishaileshmishra";
String filePath = "/Users/shaileshmishra/Documents/workspace/GitHub/contentstack-management-java/src/test/resources/asset.png";
Contentstack client = new Contentstack.Builder().build();
Stack stack = client.stack("Your-api-key", "authorization");
diff --git a/src/test/java/com/contentstack/cms/stack/AssetUnitTest.java b/src/test/java/com/contentstack/cms/stack/AssetUnitTest.java
index 8abfb6aa..e642347b 100644
--- a/src/test/java/com/contentstack/cms/stack/AssetUnitTest.java
+++ b/src/test/java/com/contentstack/cms/stack/AssetUnitTest.java
@@ -168,7 +168,7 @@ void testAssetReplace() {
asset.addParam("include_dimension", true);
String filePath = "/Users/shaileshmishra/Downloads/calendar.png";
- Request resp = asset.replace(filePath, "The calender has been placed to assets by ***REMOVED***")
+ Request resp = asset.replace(filePath, "The calender has been placed to assets by ishaileshmishra")
.request();
Assertions.assertTrue(resp.isHttps());
Assertions.assertEquals("PUT", resp.method());
diff --git a/src/test/java/com/contentstack/cms/stack/EntryFieldsAPITest.java b/src/test/java/com/contentstack/cms/stack/EntryFieldsAPITest.java
index ec99a09f..8e4753fa 100644
--- a/src/test/java/com/contentstack/cms/stack/EntryFieldsAPITest.java
+++ b/src/test/java/com/contentstack/cms/stack/EntryFieldsAPITest.java
@@ -62,7 +62,7 @@ void testEntryFetch() {
void testEntryCreate() {
JSONObject body = new JSONObject();
body.put("title", "The Create an entry call creates a new entry for the selected content type for testing");
- body.put("url", "www.***REMOVED***.in/stack/content_type/entry/fakeuid/code");
+ body.put("url", "www.ishaileshmishra.in/stack/content_type/entry/fakeuid/code");
JSONObject entryCreate = new JSONObject();
entryCreate.put("entry", body);
Request request = entry.create(entryCreate).request();
@@ -82,7 +82,7 @@ void testEntryCreate() {
void testUpdate() {
JSONObject body = new JSONObject();
body.put("title", "The Create an entry call creates a new entry for the selected content type for testing");
- body.put("url", "www.***REMOVED***.in/stack/content_type/entry/fakeuid/code");
+ body.put("url", "www.ishaileshmishra.in/stack/content_type/entry/fakeuid/code");
JSONObject entryUpdate = new JSONObject();
entryUpdate.put("entry", body);
@@ -105,7 +105,7 @@ void testUpdate() {
void testAtomicOperation() {
JSONObject body = new JSONObject();
body.put("title", "The Create an entry call creates a new entry for the selected content type for testing");
- body.put("url", "www.***REMOVED***.in/stack/content_type/entry/fakeuid/code");
+ body.put("url", "www.ishaileshmishra.in/stack/content_type/entry/fakeuid/code");
JSONObject entryBody = new JSONObject();
entryBody.put("entry", body);
@@ -145,7 +145,7 @@ void testEntryDelete() {
void testEntryVersionName() {
JSONObject body = new JSONObject();
body.put("title", "The Create an entry call creates a new entry for the selected content type for testing");
- body.put("url", "www.***REMOVED***.in/stack/content_type/entry/fakeuid/code");
+ body.put("url", "www.ishaileshmishra.in/stack/content_type/entry/fakeuid/code");
JSONObject entryBody = new JSONObject();
entryBody.put("entry", body);
@@ -187,7 +187,7 @@ void testEntryDetailOfAllVersion() {
void testEntryDeleteVersionName() {
JSONObject body = new JSONObject();
body.put("title", "The Create an entry call creates a new entry for the selected content type for testing");
- body.put("url", "www.***REMOVED***.in/stack/content_type/entry/fakeuid/code");
+ body.put("url", "www.ishaileshmishra.in/stack/content_type/entry/fakeuid/code");
JSONObject entryBody = new JSONObject();
entryBody.put("entry", body);
@@ -229,7 +229,7 @@ void testEntryGetReference() {
void testEntryLocalise() {
JSONObject body = new JSONObject();
body.put("title", "The Create an entry call creates a new entry for the selected content type for testing");
- body.put("url", "www.***REMOVED***.in/stack/content_type/entry/fakeuid/code");
+ body.put("url", "www.ishaileshmishra.in/stack/content_type/entry/fakeuid/code");
JSONObject entryBody = new JSONObject();
entryBody.put("entry", body);
@@ -303,7 +303,7 @@ void testEntryImportExisting() {
void testEntryPublish() {
JSONObject body = new JSONObject();
body.put("title", "The Create an entry call creates a new entry for the selected content type for testing");
- body.put("url", "www.***REMOVED***.in/stack/content_type/entry/fakeuid/code");
+ body.put("url", "www.ishaileshmishra.in/stack/content_type/entry/fakeuid/code");
JSONObject entryBody = new JSONObject();
entryBody.put("entry", body);
@@ -326,7 +326,7 @@ void testEntryPublish() {
void testEntryPublishWithReference() {
JSONObject body = new JSONObject();
body.put("title", "The Create an entry call creates a new entry for the selected content type for testing");
- body.put("url", "www.***REMOVED***.in/stack/content_type/entry/fakeuid/code");
+ body.put("url", "www.ishaileshmishra.in/stack/content_type/entry/fakeuid/code");
JSONObject entryBody = new JSONObject();
entryBody.put("entry", body);
Request request = entry.publishWithReference(entryBody).request();
@@ -347,7 +347,7 @@ void testEntryPublishWithReference() {
void testPublishWithReference() {
JSONObject body = new JSONObject();
body.put("title", "The Create an entry call creates a new entry for the selected content type for testing");
- body.put("url", "www.***REMOVED***.in/stack/content_type/entry/fakeuid/code");
+ body.put("url", "www.ishaileshmishra.in/stack/content_type/entry/fakeuid/code");
JSONObject entryBody = new JSONObject();
entryBody.put("entry", body);
diff --git a/src/test/java/com/contentstack/cms/stack/RoleAPITest.java b/src/test/java/com/contentstack/cms/stack/RoleAPITest.java
index c22260a6..8964b6ce 100644
--- a/src/test/java/com/contentstack/cms/stack/RoleAPITest.java
+++ b/src/test/java/com/contentstack/cms/stack/RoleAPITest.java
@@ -1,14 +1,21 @@
package com.contentstack.cms.stack;
+import com.contentstack.cms.Contentstack;
import com.contentstack.cms.TestClient;
+import com.contentstack.cms.Utils;
import com.contentstack.cms.core.Util;
+import com.google.gson.JsonObject;
+
import okhttp3.Request;
import okhttp3.ResponseBody;
import org.json.simple.JSONObject;
import org.junit.jupiter.api.*;
+
+import retrofit2.Call;
import retrofit2.Response;
import java.io.IOException;
+import java.util.HashMap;
@Tag("api")
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@@ -19,15 +26,22 @@ class RoleAPITest {
protected static String _uid = TestClient.AUTHTOKEN;
protected static String MANAGEMENT_TOKEN = TestClient.MANAGEMENT_TOKEN;
protected static Roles roles;
- static Stack stack;
+ protected static String Taxonomy_uid = "sample_two";
+ protected static Taxonomy taxonomy;
+ protected static Terms term;
+ protected static Stack stack;
@BeforeAll
static void setup() {
- stack = TestClient.getStack();
- stack.addHeader(Util.API_KEY, API_KEY);
- stack.addHeader(Util.AUTHORIZATION, MANAGEMENT_TOKEN);
+ final String AUTHTOKEN = TestClient.AUTHTOKEN;
+ HashMap headers = new HashMap<>();
+ headers.put(Util.API_KEY, API_KEY);
+ headers.put(Util.AUTHORIZATION, MANAGEMENT_TOKEN);
+ stack = new Contentstack.Builder().setAuthtoken(AUTHTOKEN).build().stack(headers);
roles = stack.roles(_uid);
+ taxonomy = stack.taxonomy();
+ term = stack.taxonomy(Taxonomy_uid).terms();
}
@Test
@@ -111,5 +125,54 @@ void deleteRole() {
Assertions.assertNull(request.url().encodedQuery());
Assertions.assertEquals("https://api.contentstack.io/v3/roles/" + _uid, request.url().toString());
}
+ @Test
+ void createRoleWithRule1() throws IOException{
+ JSONObject requestTaxonomy = Utils.readJson("mocktaxonomy/create.json");
+ taxonomy.addHeader(Util.API_KEY, API_KEY);
+ taxonomy.addHeader(Util.AUTHORIZATION, MANAGEMENT_TOKEN);
+ Request request = taxonomy.create(requestTaxonomy).request();
+ Assertions.assertEquals(2, request.headers().names().size());
+ Assertions.assertEquals("POST", request.method());
+ Assertions.assertTrue(request.url().isHttps());
+ Assertions.assertEquals("api.contentstack.io", request.url().host());
+ Assertions.assertEquals(2, request.url().pathSegments().size());
+ Assertions.assertEquals("v3", request.url().pathSegments().get(0));
+ Assertions.assertEquals("taxonomies", request.url().pathSegments().get(1));
+ Assertions.assertNull(request.url().encodedQuery());
+ Assertions.assertEquals("https://api.contentstack.io/v3/taxonomies", request.url().toString());
+
+ }
+ @Test
+ void createRoleWithRule2() throws IOException{
+ JSONObject requestTerm = Utils.readJson("mocktaxonomy/createTerm.json");
+ Request request = term.create(requestTerm).request();
+ Assertions.assertEquals(2, request.headers().names().size());
+ Assertions.assertEquals("POST", request.method());
+ Assertions.assertTrue(request.url().isHttps());
+ Assertions.assertEquals("api.contentstack.io", request.url().host());
+ Assertions.assertEquals(4, request.url().pathSegments().size());
+ Assertions.assertEquals("v3", request.url().pathSegments().get(0));
+ Assertions.assertEquals("taxonomies", request.url().pathSegments().get(1));
+ Assertions.assertNull(request.url().encodedQuery());
+ Assertions.assertEquals("https://api.contentstack.io/v3/taxonomies/sample_two/terms", request.url().toString());
+
+ }
+ @Test
+ void createRoleWithTaxonomy() throws IOException{
+ JSONObject requestBody = Utils.readJson("mockrole/createRole.json");
+ roles.addHeader(Util.API_KEY, API_KEY);
+ roles.addHeader(Util.AUTHORIZATION, MANAGEMENT_TOKEN);
+ Request request = roles.create(requestBody).request();
+ Assertions.assertEquals(3, request.headers().names().size());
+ Assertions.assertEquals("POST", request.method());
+ Assertions.assertTrue(request.url().isHttps());
+ Assertions.assertEquals("api.contentstack.io", request.url().host());
+ Assertions.assertEquals(2, request.url().pathSegments().size());
+ Assertions.assertEquals("v3", request.url().pathSegments().get(0));
+ Assertions.assertEquals("roles", request.url().pathSegments().get(1));
+ Assertions.assertNull(request.url().encodedQuery());
+ Assertions.assertEquals("https://api.contentstack.io/v3/roles", request.url().toString());
+
+ }
}
diff --git a/src/test/java/com/contentstack/cms/stack/RoleUnitTest.java b/src/test/java/com/contentstack/cms/stack/RoleUnitTest.java
index 42d335af..6e50a9cc 100644
--- a/src/test/java/com/contentstack/cms/stack/RoleUnitTest.java
+++ b/src/test/java/com/contentstack/cms/stack/RoleUnitTest.java
@@ -2,13 +2,19 @@
import com.contentstack.cms.Contentstack;
import com.contentstack.cms.TestClient;
+import com.contentstack.cms.Utils;
import com.contentstack.cms.core.Util;
import okhttp3.Request;
+import okhttp3.ResponseBody;
+import retrofit2.Call;
+import retrofit2.Response;
+
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.junit.jupiter.api.*;
+import java.io.IOException;
import java.util.HashMap;
@Tag("unit")
@@ -206,8 +212,11 @@ void singleRole() {
@Test
@Order(8)
- void createRole() {
+ void createRole() throws IOException {
Request request = roles.create(body).request();
+ Call responseBody = roles.create(body);
+ Response resp = responseBody.execute();
+ System.out.println(resp.toString());
Assertions.assertEquals(0, request.headers().names().size());
Assertions.assertEquals("POST", request.method());
Assertions.assertTrue(request.url().isHttps());
@@ -220,9 +229,26 @@ void createRole() {
"https://api.contentstack.io/v3/roles",
request.url().toString());
}
-
@Test
@Order(9)
+ void createRoleWithTaxonomy() throws IOException {
+ JSONObject roleBody = Utils.readJson("mockrole/createRole.json");
+ Request request = roles.create(roleBody).request();
+ Assertions.assertEquals(2, request.headers().names().size());
+ Assertions.assertEquals("POST", request.method());
+ Assertions.assertTrue(request.url().isHttps());
+ Assertions.assertEquals("api.contentstack.io", request.url().host());
+ Assertions.assertEquals(2, request.url().pathSegments().size());
+ Assertions.assertEquals("roles", request.url().pathSegments().get(1));
+ Assertions.assertNotNull(request.body());
+ Assertions.assertNull(request.url().encodedQuery());
+ Assertions.assertEquals(
+ "https://api.contentstack.io/v3/roles",
+ request.url().toString());
+ }
+
+ @Test
+ @Order(10)
void updateRole() {
Request request = roles.update(body).request();
Assertions.assertEquals(0, request.headers().names().size());
@@ -236,7 +262,7 @@ void updateRole() {
}
@Test
- @Order(10)
+ @Order(11)
void deleteRole() {
Request request = roles.delete().request();
Assertions.assertEquals(1, request.headers().names().size());
diff --git a/src/test/java/com/contentstack/cms/stack/StackAPITest.java b/src/test/java/com/contentstack/cms/stack/StackAPITest.java
index 7e7b5222..38d40078 100644
--- a/src/test/java/com/contentstack/cms/stack/StackAPITest.java
+++ b/src/test/java/com/contentstack/cms/stack/StackAPITest.java
@@ -158,7 +158,7 @@ void testStackTransferOwnership() {
assert response.errorBody() != null;
Error error = new Gson().fromJson(response.errorBody().string(), Error.class);
int errCode = error.getErrorCode();
- Assertions.assertEquals(105, errCode);
+ Assertions.assertEquals(309, errCode);
}
} catch (IOException e) {
log.warning(e.getLocalizedMessage());
diff --git a/src/test/resources/entry.json b/src/test/resources/entry.json
index a7fd86c3..d2f2d452 100644
--- a/src/test/resources/entry.json
+++ b/src/test/resources/entry.json
@@ -10,7 +10,7 @@
"tags": [
"abdn",
"shailesh",
- "***REMOVED***",
+ "ishaileshmishra",
"nature",
"loves"
],
diff --git a/src/test/resources/mockrole/createRole.json b/src/test/resources/mockrole/createRole.json
new file mode 100644
index 00000000..a9ad3185
--- /dev/null
+++ b/src/test/resources/mockrole/createRole.json
@@ -0,0 +1,66 @@
+{
+ "role": {
+ "name": "test",
+ "description": "Test for taxonomy permissions",
+ "rules": [
+ {
+ "module": "branch",
+ "branches": [
+ "main"
+ ],
+ "acl": {
+ "read": true
+ }
+ },
+ {
+ "module": "environment",
+ "environments": [],
+ "acl": {
+ "read": true
+ }
+ },
+ {
+ "module": "locale",
+ "locales": [],
+ "acl": {
+ "read": true
+ }
+ },
+ {
+ "module": "taxonomy",
+ "taxonomies": [
+ "sample_two"
+ ],
+ "terms": [
+ "term_a"
+ ],
+ "content_types": [
+ {
+ "uid": "$all",
+ "acl": {
+ "read": true,
+ "sub_acl": {
+ "read": true,
+ "create": true,
+ "update": true,
+ "delete": true,
+ "publish": true
+ }
+ }
+ }
+ ],
+ "acl": {
+ "read": true,
+ "sub_acl": {
+ "read": true,
+ "create": true,
+ "update": true,
+ "delete": true,
+ "publish": true
+ }
+ }
+ }
+ ],
+ "uid": "role_uid"
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/mockrole/updateRole.json b/src/test/resources/mockrole/updateRole.json
new file mode 100644
index 00000000..b01c471b
--- /dev/null
+++ b/src/test/resources/mockrole/updateRole.json
@@ -0,0 +1,78 @@
+{
+ "role":{
+ "name":"sample111",
+ "description":"This is a test role.",
+ "rules":[
+ {
+ "module":"branch",
+ "branches":[
+ "main"
+ ],
+ "acl":{
+ "read":true
+ }
+ },
+ {
+ "module":"content_type",
+ "content_types":[
+ "$all"
+ ],
+ "acl":{
+ "read":true,
+ "sub_acl":{
+ "read":true
+ }
+ }
+ },
+ {
+ "module":"asset",
+ "assets":[
+ "$all"
+ ],
+ "acl":{
+ "read":true,
+ "update":true,
+ "publish":true,
+ "delete":true
+ }
+ },
+ {
+ "module":"folder",
+ "folders":[
+ "$all"
+ ],
+ "acl":{
+ "read":true,
+ "update":true,
+ "publish":true,
+ "delete":true,
+ "sub_acl":{
+ "read":true,
+ "update":true,
+ "publish":true,
+ "delete":true
+ }
+ }
+ },
+ {
+ "module":"environment",
+ "environments":[
+ "$all"
+ ],
+ "acl":{
+ "read":true
+ }
+ },
+ {
+ "module":"locale",
+ "locales":[
+ "$all"
+ ],
+ "acl":{
+ "read":true
+ }
+ }
+ ],
+ "uid":"blt668fa7872710da7c"
+ }
+ }
\ No newline at end of file
diff --git a/src/test/resources/mockstack/setting.json b/src/test/resources/mockstack/setting.json
index 1ed9f2e2..6b934c20 100644
--- a/src/test/resources/mockstack/setting.json
+++ b/src/test/resources/mockstack/setting.json
@@ -5,7 +5,7 @@
"sys_rte_allowed_tags":"style, figure, script"
},
"rte":{
- "***REMOVED***":true
+ "ishaileshmishra":true
}
}
}
\ No newline at end of file
diff --git a/src/test/resources/mockstack/share_stack.json b/src/test/resources/mockstack/share_stack.json
index b22145ce..ffdf7862 100644
--- a/src/test/resources/mockstack/share_stack.json
+++ b/src/test/resources/mockstack/share_stack.json
@@ -1,10 +1,10 @@
{
"emails": [
- "***REMOVED***@contentstack.com"
+ "ishaileshmishra@contentstack.com"
],
"roles": {
"manager@example.com": [
- "***REMOVED***8176367267626"
+ "ishaileshmishra8176367267626"
]
}
}
\ No newline at end of file
diff --git a/src/test/resources/mockstack/unshare.json b/src/test/resources/mockstack/unshare.json
index 437c8054..5cd89d83 100644
--- a/src/test/resources/mockstack/unshare.json
+++ b/src/test/resources/mockstack/unshare.json
@@ -1,3 +1,3 @@
{
- "email": "***REMOVED***@manager.com"
+ "email": "ishaileshmishra@manager.com"
}
\ No newline at end of file
diff --git a/src/test/resources/mocktaxonomy/create.json b/src/test/resources/mocktaxonomy/create.json
index 9e0c2a8e..d452e367 100644
--- a/src/test/resources/mocktaxonomy/create.json
+++ b/src/test/resources/mocktaxonomy/create.json
@@ -1,8 +1,8 @@
{
"taxonomy": {
- "uid": "sample_one",
- "name": "Sample One",
+ "uid": "sample_two",
+ "name": "Sample Two",
"description": "Description for the sample one taxonomy."
}
}
\ No newline at end of file
diff --git a/src/test/resources/mocktaxonomy/update.json b/src/test/resources/mocktaxonomy/update.json
index ece28e56..99f965db 100644
--- a/src/test/resources/mocktaxonomy/update.json
+++ b/src/test/resources/mocktaxonomy/update.json
@@ -1,6 +1,6 @@
{
"taxonomy": {
- "name": "Updated Sample One",
+ "name": "Updated Sample Two",
"description": "Updated description for the sample one taxonomy."
}
}
\ No newline at end of file
diff --git a/testng.xml b/testng.xml
deleted file mode 100644
index 23abbf08..00000000
--- a/testng.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file