Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdmx-tck-manager/src/checker/HttpResponseValidator.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class HttpResponseValidator {
} catch (err) {
let tckStatus = FAILURE_CODE;
let code = httpResponse != null ? httpResponse.status : void 0;
if (code === 404 || code === 501) {
if (code === 404 || code === 501 || code === 406) {
tckStatus = SUCCESS_CODE;
}
resolve({ status: tckStatus, url: httpResponse.url, httpStatus: httpResponse.status, error: err.toString() });
Expand Down Expand Up @@ -72,7 +72,7 @@ class HttpResponseValidator {
if (!isDefined(response) && !response.status) {
throw new TckError('No response status')
}
if (response.status !== "406") {
if (response.status !== 406) {
throw new TckError("Response status was not 406 but " + response.status + " instead");
}
}
Expand Down
8 changes: 4 additions & 4 deletions sdmx-tck-manager/src/manager/StructureTestExecutionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ class StructureTestExecutionManager {
console.log("Test: " + toRun.testId + " SDMX workspace created.");

// If the Rest Resource is "structure" then we have to call the getRandomSdmxObject() function.
var randomStructure = workspace.getRandomSdmxObjectOfType(SDMX_STRUCTURE_TYPE.fromRestResource(toRun.resource));
if (toRun.resource === "structure") {
randomStructure = workspace.getRandomSdmxObject();
}
let randomStructure = (toRun.resource === "structure")
? workspace.getRandomSdmxObject()
: workspace.getRandomSdmxObjectOfType(SDMX_STRUCTURE_TYPE.fromRestResource(toRun.resource));

testResult.randomStructure = {
structureType: randomStructure.getStructureType(),
agencyId: randomStructure.getAgencyId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,10 @@ class SdmxV21StructuresParser {
structures.set(structureType, []);
}
structures.get(structureType).push(
new MaintainableObject(structureType, hierarchicalCodelist,
new ItemSchemeObject(structureType, hierarchicalCodelist,
SdmxV21StructureReferencesParser.getReferences(hierarchicalCodelist),
SdmxV21JsonForStubsParser.getDetail(structureType, hierarchicalCodelist)
SdmxV21JsonForStubsParser.getDetail(structureType, hierarchicalCodelist),
SdmxV21JsonItemsParser.getItems(structureType, hierarchicalCodelist)
)
);
}
Expand Down