Fixes for SDMX 2.1 Structure Tests #11
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes handling of 406 response code
During the execution of the
/codelist/agency/id/version (invalid representation query)
test, 406 status is expected as per the spec. Yet, existing code was not handling this status properly which resulted in test execution error, despite the server under test responding with expected status.Fixes hierarchical codelist's base type
Although
HierarchicalCodelist
(HC for short) is not extendingItemScheme
base type in the information model, it is still assumed by the REST spec that it will be a subject to item scheme queries. So, the test infrastructure attempts so select a random set ofHierarchy
items from HC and code fails to do so, because object which is used to enclose HC information is aMaintainableObject
type. At the same time HC is listed as a member in theITEM_SCHEME_TYPES
enumeration. So in order for the test code to be able to select random items of the HC, its info carrier object was changed toItemSchemeObject
Fixes handling of 'structure' request type parameter
When
/structure/all/all/all
test is executed, the code attempted to select a random object from the workspace by thestructure
type. Call toSDMX_STRUCTURE_TYPE.fromRestResource(toRun.resource)
resulted innull
which in turn triggered the error by theworkspace.getRandomSdmxObjectOfType()
function invocation with'Missing mandatory parameter \'structureType\''
message. Because of this, child tests would also fail.Restructured the test code to execute only one of two possible condition branches (random by type VS any random from workspace).