?>Array ( [id] => 62 )
Scénario de test & Cas d'usage
Setup of a base caslib for testing. A subdirectory 'existing_folder' is also created to test behavior when attempting to create a directory that already exists.
| 1 | PROC CAS; |
| 2 | caslib govTest path='/cas/data/gov' dataSource={srcType='path'}; |
| 3 | TABLE.addCaslibSubdir / caslib='govTest' path='existing_folder'; |
| 4 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.addCaslibSubdir / caslib='nonExistentCaslib' path='should_fail'; |
| 3 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.addCaslibSubdir / caslib='govTest' path='invalid_perms' permission='ALLOW_ALL'; |
| 3 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.addCaslibSubdir / caslib='govTest' path='existing_folder'; |
| 3 | RUN; |
| 1 | PROC CAS; |
| 2 | TABLE.addCaslibSubdir / caslib='govTest' path='../attempted_escape'; |
| 3 | RUN; |
Each test step is expected to fail. The SAS log for each step should contain a clear ERROR or WARNING message explaining the reason for failure: caslib not found, invalid permission value, directory already exists, or invalid path. The file system should remain unchanged by these failed attempts, demonstrating the action's robustness and security.