Skip to content

Commit

Permalink
Add more unit tests
Browse files Browse the repository at this point in the history
Add debug logging redaction unit testing for other function groups
Fix some underlying bugs/inconsistencies in other unit testing.

Signed-off-by: Elijah Swift <elijah.swift@ibm.com>
  • Loading branch information
ElijahSwiftIBM committed Mar 4, 2024
1 parent 58e81c1 commit f01f477
Show file tree
Hide file tree
Showing 71 changed files with 1,905 additions and 214 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@

[pyRACF:Debug]
Request Dictionary
DataSetAdmin.alter()


{}


[pyRACF:Debug]
Request XML
DataSetAdmin.alter()


<securityrequest xmlns="http://www.ibm.com/systems/zos/saf" xmlns:racf="http://www.ibm.com/systems/zos/racf">
<dataset name="ESWIFT.TEST.T1136242.P3020470" operation="listdata" generic="no" requestid="DatasetRequest"/>
</securityrequest>


[pyRACF:Debug]
Result XML
DataSetAdmin.alter()


<?xml version="1.0" encoding="IBM-1047"?>
<securityresult xmlns="http://www.ibm.com/systems/zos/saf/IRRSMO00Result1">
<dataset name="ESWIFT.TEST.T1136242.P3020470" operation="listdata" generic="no" requestid="DatasetRequest">
<command>
<safreturncode>0</safreturncode>
<returncode>0</returncode>
<reasoncode>0</reasoncode>
<image>LISTDSD DATASET ('ESWIFT.TEST.T1136242.P3020470')</image>
<message>INFORMATION FOR DATASET ESWIFT.TEST.T1136242.P3020470</message>
<message/>
<message>LEVEL OWNER UNIVERSAL ACCESS WARNING ERASE</message>
<message>----- -------- ---------------- ------- -----</message>
<message> 00 ESWIFT READ NO NO</message>
<message/>
<message>AUDITING</message>
<message>--------</message>
<message>FAILURES(READ)</message>
<message/>
<message>NOTIFY</message>
<message>--------</message>
<message>NO USER TO BE NOTIFIED</message>
<message/>
<message>YOUR ACCESS CREATION GROUP DATASET TYPE</message>
<message>----------- -------------- ------------</message>
<message> ALTER SYS1 NON-VSAM</message>
<message/>
<message>VOLUMES ON WHICH DATASET RESIDES</message>
<message>--------------------------------</message>
<message>USRAT2</message>
<message/>
<message>NO INSTALLATION DATA</message>
</command>
</dataset>
<returncode>0</returncode>
<reasoncode>0</reasoncode>
</securityresult>


[pyRACF:Debug]
Result Dictionary
DataSetAdmin.alter()


{
"securityResult": {
"dataSet": {
"name": "ESWIFT.TEST.T1136242.P3020470",
"operation": "listdata",
"generic": "no",
"requestId": "DatasetRequest",
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "LISTDSD DATASET ('ESWIFT.TEST.T1136242.P3020470')",
"messages": [
"INFORMATION FOR DATASET ESWIFT.TEST.T1136242.P3020470",
null,
"LEVEL OWNER UNIVERSAL ACCESS WARNING ERASE",
"----- -------- ---------------- ------- -----",
" 00 ESWIFT READ NO NO",
null,
"AUDITING",
"--------",
"FAILURES(READ)",
null,
"NOTIFY",
"--------",
"NO USER TO BE NOTIFIED",
null,
"YOUR ACCESS CREATION GROUP DATASET TYPE",
"----------- -------------- ------------",
" ALTER SYS1 NON-VSAM",
null,
"VOLUMES ON WHICH DATASET RESIDES",
"--------------------------------",
"USRAT2",
null,
"NO INSTALLATION DATA"
]
}
]
},
"returnCode": 0,
"reasonCode": 0,
"runningUserid": "testuser"
}
}


[pyRACF:Debug]
Result Dictionary (Formatted Profile)
DataSetAdmin.alter()


{
"securityResult": {
"dataSet": {
"name": "ESWIFT.TEST.T1136242.P3020470",
"operation": "listdata",
"generic": "no",
"requestId": "DatasetRequest",
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "LISTDSD DATASET ('ESWIFT.TEST.T1136242.P3020470')",
"profiles": [
{
"base": {
"name": "eswift.test.t1136242.p3020470",
"level": 0,
"owner": "eswift",
"universalAccess": "read",
"warning": null,
"erase": null,
"auditing": {
"failures": "read"
},
"notify": null,
"yourAccess": "alter",
"creationGroup": "sys1",
"dataSetType": "non-vsam",
"volumes": [
"usrat2"
],
"installationData": null,
"generic": false
}
}
]
}
]
},
"returnCode": 0,
"reasonCode": 0,
"runningUserid": "testuser"
}
}


[pyRACF:Debug]
Request Dictionary
DataSetAdmin.alter()


{
"base": {
"base:universal_access": {
"value": "********",
"operation": null
},
"base:owner": {
"value": "eswift",
"operation": null
}
}
}


[pyRACF:Debug]
Request XML
DataSetAdmin.alter()


<securityrequest xmlns="http://www.ibm.com/systems/zos/saf" xmlns:racf="http://www.ibm.com/systems/zos/racf">
<dataset name="ESWIFT.TEST.T1136242.P3020470" operation="set" generic="no" requestid="DatasetRequest">
<base>
<racf:uacc operation="set">********</racf:uacc>
<racf:owner operation="set">eswift</racf:owner>
</base>
</dataset>
</securityrequest>


[pyRACF:Debug]
Result XML
DataSetAdmin.alter()


<?xml version="1.0" encoding="IBM-1047"?>
<securityresult xmlns="http://www.ibm.com/systems/zos/saf/IRRSMO00Result1">
<dataset name="ESWIFT.TEST.T113622.P3020470" operation="set" generic="no" requestid="DatasetRequest">
<command>
<safreturncode>8</safreturncode>
<returncode>16</returncode>
<reasoncode>4</reasoncode>
<image>ADDSD ('ESWIFT.TEST.T113622.P3020470')</image>
<message>ICH09005I ESWIFT.TEST.T113622.P3020470 NOT FOUND IN CATALOG</message>
</command>
<command>
<safreturncode>8</safreturncode>
<returncode>16</returncode>
<reasoncode>4</reasoncode>
<image>ALTDSD ('ESWIFT.TEST.T113622.P3020470') UACC (********)</image>
<message>ICH22001I ESWIFT.TEST.T113622.P3020470 NOT DEFINED TO RACF</message>
</command>
</dataset>
<returncode>4</returncode>
<reasoncode>0</reasoncode>
</securityresult>


[pyRACF:Debug]
Result Dictionary
DataSetAdmin.alter()


{
"securityResult": {
"dataSet": {
"name": "ESWIFT.TEST.T113622.P3020470",
"operation": "set",
"generic": "no",
"requestId": "DatasetRequest",
"commands": [
{
"safReturnCode": 8,
"returnCode": 16,
"reasonCode": 4,
"image": "ADDSD ('ESWIFT.TEST.T113622.P3020470')",
"messages": [
"ICH09005I ESWIFT.TEST.T113622.P3020470 NOT FOUND IN CATALOG"
]
},
{
"safReturnCode": 8,
"returnCode": 16,
"reasonCode": 4,
"image": "ALTDSD ('ESWIFT.TEST.T113622.P3020470') UACC (********)",
"messages": [
"ICH22001I ESWIFT.TEST.T113622.P3020470 NOT DEFINED TO RACF"
]
}
]
},
"returnCode": 4,
"reasonCode": 0,
"runningUserid": "testuser"
}
}

Loading

0 comments on commit f01f477

Please sign in to comment.