Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPMPackageManager tests rely on unstable IG #1192

Closed
JPercival opened this issue Aug 20, 2023 · 0 comments · Fixed by #1195
Closed

NPMPackageManager tests rely on unstable IG #1192

JPercival opened this issue Aug 20, 2023 · 0 comments · Fixed by #1195
Labels

Comments

@JPercival
Copy link
Contributor

Tests for NPMPackageManager fail because they rely on an development version of an IG, which may or may not contain the resources referenced. The test needs to be rewritten such that it does not have external or unstable dependencies.

The test is here:

@Ignore("This test depends on the example.fhir.uv.myig package, which is not currently published")
public void TestSampleContentIGLocal() {
Resource igResource = (Resource) FhirContext.forR4Cached().newXmlParser().parseResource(
NpmPackageManagerTests.class.getResourceAsStream("mycontentig.xml"));
ImplementationGuide ig = (ImplementationGuide) convertor.convertResource(igResource);
NpmPackageManager pm = new NpmPackageManager(ig);
assertTrue(pm.getNpmList().size() >= 3);
boolean hasFHIR = false;
boolean hasMyIG = false;
boolean hasCommon = false;
boolean hasCPG = false;
for (NpmPackage p : pm.getNpmList()) {
switch (p.canonical()) {
case "http://hl7.org/fhir": hasFHIR = true; break;
case "http://somewhere.org/fhir/uv/myig": hasMyIG = true; break;
case "http://fhir.org/guides/cqf/common": hasCommon = true; break;
case "http://hl7.org/fhir/uv/cpg": hasCPG = true; break;
}
}
assertTrue(hasFHIR);
assertTrue(hasMyIG);
assertTrue(hasCommon);
assertTrue(hasCPG);
}

The resource that is causing issues is here:

<packageId value="example.fhir.uv.myig"/>
<version value="dev"/>
</dependsOn>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant