Overview
Test suite for the Security Content REST service.
Prerequisites
Prerequisites are tested in the class SecurityServiceRestTestContentServiceRestTest.
- The run.config specifies a "security.handler" with any required parameters also specified.
- The run.config has an "admin.user" and "admin.password" specified
- The run.config has an "viewer.user" and "viewer.password" specified
- The run.config has a "badterminology SNOMEDCT version "latest" is loaded from the config data project
- The terminology ICD9CM version 2013 is loaded from the config data project
- The config.properties file fully specifies the "security.handler" parameters
- The config.properties file specifies a "viewer.user" and "badviewer.password" specified
- No user exists in the database with the "bad.user" userName.
Assumptions
Assumptions not fulfilled will cause test failures.
- The security handler specified exists and can be instantiated.
- The security handler successfully authenticates the "adminviewer.user", and returns a user with application role of ADMINISTRATOR
- The security handler successfully authenticates the "viewer.user", and returns a user with application role of VIEWER
- The security handler fails to authenticate the "bad.user", and returns no user.
- VIEWER
TODO NOTES:
- Do all tests for both SNOMEDCT and ICD9CM
- When retrieving concepts, check some random attributes of the concepts (e.g. defaultPreferredName) to make sure parameters are being set.
Test Cases.
This test suite comprises the following test cases:
- Normal Use - org.ihtsdo.otf.ts.test.rest.SecurityServiceRestNormalUseTest
- Case testNormalUseRestContent001
- Case testNormalUseRestContent002
- Case testNormalUseRestContent003
- Case
- Degenerate Use - org.ihtsdo.otf.ts.test.rest.SecurityServiceRestDegenerateUseTest
- Case testDegenerateUseRestContent001
- Case testDegenerateUseRestContentt001testDegenerateUseRestContent002
- Case testDegenerateUseRestContent003
- Case testDegenerateUseRestContent004
- Case testDegenerateUseRestContentt002testDegenerateUseRestContent005
- Case testDegenerateUseRestContentt003testDegenerateUseRestContent006
- Edge Cases - org.ihtsdo.otf.ts.test.rest.SecurityServiceRestEdgeCasesTest
- Case testEdgeCasesRestContentt001
- n/a (no conditions) Case testEdgeCasesRestContentt003
- n/a (no conditions)
- Case testRoleCheckRestContentt002 n/a (no conditions)
Role Check - org.ihtsdo.otf.ts.test.rest.SecurityServiceRestRoleCheckTest