From af517ebc3c8e676295cb54d832a69f4c0958e26c Mon Sep 17 00:00:00 2001 From: Mark Lawrence Date: Tue, 8 Oct 2024 17:13:06 +0100 Subject: [PATCH 1/2] fix null creds object Signed-off-by: Mark Lawrence --- .../galasa/sdv/manager/ivt/SdvManagerIVT.java | 17 +++++++++++++---- .../dev/galasa/sdv/internal/SdvManagerImpl.java | 12 ++++++++---- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/src/main/java/dev/galasa/sdv/manager/ivt/SdvManagerIVT.java b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/src/main/java/dev/galasa/sdv/manager/ivt/SdvManagerIVT.java index 5c49c204b..8b33d3b1d 100644 --- a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/src/main/java/dev/galasa/sdv/manager/ivt/SdvManagerIVT.java +++ b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/src/main/java/dev/galasa/sdv/manager/ivt/SdvManagerIVT.java @@ -14,12 +14,14 @@ import dev.galasa.Test; import dev.galasa.cicsts.CicsRegion; import dev.galasa.cicsts.CicsTerminal; +import dev.galasa.cicsts.CicstsManagerException; import dev.galasa.cicsts.ICicsRegion; import dev.galasa.cicsts.ICicsTerminal; import dev.galasa.core.manager.Logger; import dev.galasa.sdv.ISdvUser; import dev.galasa.sdv.SdvManagerException; import dev.galasa.sdv.SdvUser; +import dev.galasa.zosbatch.ZosBatchException; @Test public class SdvManagerIVT { @@ -39,15 +41,22 @@ public class SdvManagerIVT { private static final String SDV_TCPIPSERVICE_NAME = "SDVXSDT"; @BeforeClass - public void logIntoTerminals() throws SdvManagerException { - user1.logIntoTerminal(terminal); + public void logIntoTerminals() throws SdvManagerException, ZosBatchException, CicstsManagerException { + // Only run test if running on CICS 6.2+ & SEC=YES + if (!cics.getRegionJob().retrieveOutputAsString().contains("DFHXS1102I") + && !cics.getVersion().isEarlierThan(ProductVersion.v(750)) + ) { + user1.logIntoTerminal(terminal); + } } @Test public void userUsesCeda() throws Exception { - // Only run test if running on CICS 6.2+ - if (!cics.getVersion().isEarlierThan(ProductVersion.v(750))) { + // Only run test if running on CICS 6.2+ & SEC=YES + if (!cics.getRegionJob().retrieveOutputAsString().contains("DFHXS1102I") + && !cics.getVersion().isEarlierThan(ProductVersion.v(750)) + ) { terminal.type("CEDA DI G(SDVGRP)").enter().waitForTextInField(SDV_TCPIPSERVICE_NAME); diff --git a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager/src/main/java/dev/galasa/sdv/internal/SdvManagerImpl.java b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager/src/main/java/dev/galasa/sdv/internal/SdvManagerImpl.java index 3f4e73f9c..08fccee05 100644 --- a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager/src/main/java/dev/galasa/sdv/internal/SdvManagerImpl.java +++ b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager/src/main/java/dev/galasa/sdv/internal/SdvManagerImpl.java @@ -268,15 +268,19 @@ public ISdvUser getSdvUser(Field field, List annotations) try { credsObj = (ICredentialsUsernamePassword) getFramework().getCredentialsService() .getCredentials(credentialTag); - - cts.registerText(credsObj.getPassword(), - "Password for credential tag: " + credentialTag); - } catch (CredentialsException e) { throw new SdvManagerException( "No credentials were found with the tag: " + credentialTag, e); } + if (credsObj == null) { + throw new SdvManagerException( + "No credentials were found with the tag: " + credentialTag); + } + + cts.registerText(credsObj.getPassword(), + "Password for credential tag: " + credentialTag); + SdvUserImpl newSdvUser = new SdvUserImpl(credentialTag, credsObj, cicsTag, role); sdvUsersToRecordList.add(newSdvUser); From c0dc92cef58662ce2a99885d13ee9631b7c0f06f Mon Sep 17 00:00:00 2001 From: Mark Lawrence Date: Thu, 10 Oct 2024 13:46:24 +0100 Subject: [PATCH 2/2] update manager version Signed-off-by: Mark Lawrence --- .../dev.galasa.sdv.manager.ivt/build.gradle | 2 +- .../dev.galasa.sdv.manager/build.gradle | 2 +- release.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/build.gradle b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/build.gradle index 009a4fde3..63247aa44 100644 --- a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/build.gradle +++ b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager.ivt/build.gradle @@ -4,7 +4,7 @@ plugins { description = 'Galasa SDV Manager IVT' -version = '0.35.0' +version = '0.38.0' dependencies { implementation project (':galasa-managers-cicsts-parent:dev.galasa.cicsts.ceci.manager') diff --git a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager/build.gradle b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager/build.gradle index 1b42d130a..ff73d0aa3 100644 --- a/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager/build.gradle +++ b/galasa-managers-parent/galasa-managers-testingtools-parent/dev.galasa.sdv.manager/build.gradle @@ -7,7 +7,7 @@ plugins { description = 'Galasa SDV Manager' -version = '0.36.0' +version = '0.38.0' checkstyle { configFile = file("config/checkstyle/checkstyle.xml") diff --git a/release.yaml b/release.yaml index 225a5aaa4..fddcb1c41 100644 --- a/release.yaml +++ b/release.yaml @@ -394,7 +394,7 @@ managers: codecoverage: false - artifact: dev.galasa.sdv.manager - version: 0.36.0 + version: 0.38.0 obr: true mvp: true bom: true @@ -403,7 +403,7 @@ managers: codecoverage: true - artifact: dev.galasa.sdv.manager.ivt - version: 0.35.0 + version: 0.38.0 obr: true mvp: false bom: false