Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #999 from Mark-J-Lawrence/ifx
Browse files Browse the repository at this point in the history
fix null creds object
  • Loading branch information
Mark-J-Lawrence authored Oct 10, 2024
2 parents 5d00fcc + c0dc92c commit 39eeeef
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

description = 'Galasa SDV Manager'

version = '0.36.0'
version = '0.38.0'

checkstyle {
configFile = file("config/checkstyle/checkstyle.xml")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,19 @@ public ISdvUser getSdvUser(Field field, List<Annotation> 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);

Expand Down
4 changes: 2 additions & 2 deletions release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 39eeeef

Please sign in to comment.