From 4aa84bf5172c9a840fa9b7809801e06e55c0c177 Mon Sep 17 00:00:00 2001 From: Naresh Soni Date: Tue, 13 Feb 2024 21:08:31 +0000 Subject: [PATCH 1/3] CXEC-22657 : DataHub Backoffice requires same credentials to be used by different DataHub instances - added script to load defualt user credentials. --- .../impex/essentialdata-datahubtestsetup.impex | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex b/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex index 9684bcc2c..7d8798c47 100644 --- a/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex +++ b/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex @@ -2,9 +2,18 @@ # DataHub configurations -INSERT_UPDATE DataHubInstanceModel;instanceName[unique = true];instanceLocation - ;localhost;http://localhost:8080/datahub-webapp/v1; - ;datahub;http://datahub:8080/datahub-webapp/v1; +# DataHub configurations +INSERT_UPDATE DataHubUserModel;id[unique = true];userName;password +"#% beforeEach: +import de.hybris.platform.util.Config; +line.put(2, Config.getString(line.get(2), ""admin"")); +line.put(3, Config.getString(line.get(3), ""nimda"")); +" +;admin;datahub.backoffice.rest.client.username.admin;datahub.backoffice.rest.client.password.admin +;developer;datahub.backoffice.rest.client.username.developer;datahub.backoffice.rest.client.password.developer + +INSERT_UPDATE DataHubInstanceModel;instanceName[unique = true];instanceLocation;admin(id);developer(id) +;datahub;http://datahub:8080/datahub-webapp/v1;admin;developer INSERT_UPDATE OAuthClientDetails;clientId[unique=true]; resourceIds; scope; authorizedGrantTypes ; authorities; clientSecret; registeredRedirectUri From 074427054c93fddc055316c83e7431bfb8c82082 Mon Sep 17 00:00:00 2001 From: Naresh Soni Date: Tue, 13 Feb 2024 22:59:50 +0000 Subject: [PATCH 2/3] CXEC-22657 : Column alignment --- .../impex/essentialdata-datahubtestsetup.impex | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex b/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex index 7d8798c47..158587a43 100644 --- a/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex +++ b/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex @@ -1,19 +1,17 @@ #% impex.setLocale( Locale.ENGLISH ) # DataHub configurations - -# DataHub configurations -INSERT_UPDATE DataHubUserModel;id[unique = true];userName;password +INSERT_UPDATE DataHubUserModel ;id[unique = true] ; userName ; password "#% beforeEach: import de.hybris.platform.util.Config; line.put(2, Config.getString(line.get(2), ""admin"")); line.put(3, Config.getString(line.get(3), ""nimda"")); " -;admin;datahub.backoffice.rest.client.username.admin;datahub.backoffice.rest.client.password.admin -;developer;datahub.backoffice.rest.client.username.developer;datahub.backoffice.rest.client.password.developer + ;admin ; datahub.backoffice.rest.client.username.admin ; datahub.backoffice.rest.client.password.admin + ;developer ; datahub.backoffice.rest.client.username.developer ; datahub.backoffice.rest.client.password.developer -INSERT_UPDATE DataHubInstanceModel;instanceName[unique = true];instanceLocation;admin(id);developer(id) -;datahub;http://datahub:8080/datahub-webapp/v1;admin;developer +INSERT_UPDATE DataHubInstanceModel;instanceName[unique = true] ; instanceLocation ; admin(id) ; developer(id) + ;datahub ; http://datahub:8080/datahub-webapp/v1 ; admin ; developer INSERT_UPDATE OAuthClientDetails;clientId[unique=true]; resourceIds; scope; authorizedGrantTypes ; authorities; clientSecret; registeredRedirectUri From 4c0c178d91d2d95f6d5c4203783c372ff3278caa Mon Sep 17 00:00:00 2001 From: Naresh Soni Date: Mon, 19 Feb 2024 17:34:05 +0000 Subject: [PATCH 3/3] CXEC-22657 : Changed user model. --- .../resources/impex/essentialdata-datahubtestsetup.impex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex b/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex index 158587a43..8ab955945 100644 --- a/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex +++ b/core-customize/hybris/bin/custom/datahubtestsetup/resources/impex/essentialdata-datahubtestsetup.impex @@ -1,14 +1,14 @@ #% impex.setLocale( Locale.ENGLISH ) # DataHub configurations -INSERT_UPDATE DataHubUserModel ;id[unique = true] ; userName ; password +INSERT_UPDATE BasicCredential ;id[unique = true] ; userName ; password "#% beforeEach: import de.hybris.platform.util.Config; line.put(2, Config.getString(line.get(2), ""admin"")); line.put(3, Config.getString(line.get(3), ""nimda"")); " - ;admin ; datahub.backoffice.rest.client.username.admin ; datahub.backoffice.rest.client.password.admin - ;developer ; datahub.backoffice.rest.client.username.developer ; datahub.backoffice.rest.client.password.developer + ;admin ; datahub.backoffice.rest.client.username.admin ; datahub.backoffice.rest.client.password.admin + ;developer ; datahub.backoffice.rest.client.username.developer ; datahub.backoffice.rest.client.password.developer INSERT_UPDATE DataHubInstanceModel;instanceName[unique = true] ; instanceLocation ; admin(id) ; developer(id) ;datahub ; http://datahub:8080/datahub-webapp/v1 ; admin ; developer