Task #6737
Story #6723: test v2 MN and CN buildouts
Task #6724: refactor d1_integration for v2
Task #6727: refactor tests for reuse
refactor existing API test classes
100%
Description
CommonCallAdapter can contain all of the methods that the MN and CN have in common as of v1.
Most of these methods come from MNCore, MNRead, MNQuery, and also the MNAuthorization.isAuthorized() method.
The node-type-less classes for common tests should be by MN API name minus the MN prefix: "Core", "Read", "Query", "Authorization", "Storage".
I'm not sure there is enough commonality to warrant a "Storage" common-methods class. The behavior (permissions) of create, update and delete might result in quite different tests.
With the change of responsibility for systemMetadata moving from the CN to the MN in v2, some methods in v1.CN apis might now only be in v2.MN apis, and vice versa.
The best approach is probably to work through these api by api...
Related issues
History
#1 Updated by Rob Nahf almost 10 years ago
- File API differences.xlsx added
- File API differences.xlsx added
I collated the list of API methods from the api tables in the architecture documents (both v1.2 and v2.0), and figured out which methods are the same version to version and between NodeType. This should help us determine what implementation classes to put the tests into.
In some cases where the only difference between versions is accepting a sid as well as pid, I thought some of the tests could be shared, and the "versioned" tests would be the location of "sid" related tests.
I attached the collated list here as an .xlsx doc. The columns at the right indicate what implementation class(es) each method belongs in, and what type of "CommonCallAdapter" those test should probably use. (for example, we will probably create a "CNCallAdapter", "MNCallAdapter", "V2CallAdapter", etc.
#2 Updated by Rob Nahf almost 10 years ago
- Blocks Task #6731: test new tests against v1 MNs and CNs added
#3 Updated by Andrei Buium almost 10 years ago
New classes have been written to handle testing of the API methods.
These include the tests formerly covered my classes like MNodeTier*.java or CNodeTier*.java
@org.dataone.integration.it.testDefinitions@ contains interfaces specifying the tests that need to be run, by API
@org.dataone.integration.it.apiTests@ contains classes implementing those interfaces, that call the test implementations
@org.dataone.integration.it.testImplementations@ contains the test implementations called by the API tests; this is where most of the MNodeTier*/CNodeTier* code was moved to
@org.dataone.integration.adapters@ contains the CommonCallAdapter, CNCallAdapter, and MNCallAdapter, created so we can call into one class regardless of the node type or version, and have it delegate to the right implementation
#4 Updated by Andrei Buium almost 10 years ago
- Status changed from In Progress to Closed
- % Done changed from 10 to 100
- translation missing: en.field_remaining_hours set to 0
All the existing API tests have been refactored (this doesn't include functional tests).
Bugs in the test should all be fixed. The tests are now at a point where their results are matching up with the results of the existing WebTester.