table caslibInfo

API Robustness: Parameter Precedence and Error Handling

Scénario de test & Cas d'usage

Business Context

A DevOps engineer is building an automated wrapper around the CAS API. They need to verify how the system handles conflicting parameters (e.g., asking for a specific library AND filtering by type) and how it responds to requests for non-existent libraries, to ensure the wrapper handles exceptions correctly.
About the Set : table

Loading, saving, and managing in-memory tables.

Discover all actions of table
Data Preparation

Standard environment setup.

Copied!
1cas mysess;
2 
3PROC CAS;
4caslib TestLib path='/tmp/test' dataSource={srcType='PATH'};
5 
6RUN;
7 
8QUIT;
9 

Étapes de réalisation

1
Test Parameter Precedence: Request a specific 'PATH' caslib ('TestLib') but incorrectly filter for 'DNFS'. The expectation is that 'caslib' overrides 'srcType'.
Copied!
1 
2PROC CAS;
3TABLE.caslibInfo / caslib='TestLib' srcType='DNFS';
4 
5RUN;
6 
2
Test Error Handling: Request information for a completely non-existent caslib name to validate error messaging.
Copied!
1 
2PROC CAS;
3TABLE.caslibInfo / caslib='GhostLibrary';
4 
5RUN;
6 

Expected Result


In Step 1, the system should ignore 'srcType=DNFS' and return info for 'TestLib' (as per documentation that 'caslib' parameter takes precedence). In Step 2, the action should return a specific severity error indicating the library does not exist, allowing the wrapper to catch the exception.