Skip to content

Commit

Permalink
[NOJIRA]
Browse files Browse the repository at this point in the history
Various test fixes. Updated backing files and references to them
to use things that are actually creatable/writeable.
  • Loading branch information
Bill Smith committed Aug 30, 2018
1 parent 0505bae commit 9caacdc
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import javax.validation.ConstraintViolationException;
import java.io.File;
import java.io.IOException;
import java.net.URL;

/**
* @author Bill Smith (wsmith@unicon.net)
Expand Down Expand Up @@ -59,7 +60,8 @@ private OpenSamlFileBackedHTTPMetadataResolver convertToOpenSamlRepresentation(F

private OpenSamlFilesystemMetadataResolver convertToOpenSamlRepresentation(FilesystemMetadataResolver resolver) throws IOException, ResolverException, ComponentInitializationException {
IndexWriter indexWriter = indexWriterService.getIndexWriter(resolver.getResourceId());
File metadataFile = new File(resolver.getMetadataFile());
URL url = Thread.currentThread().getContextClassLoader().getResource(resolver.getMetadataFile());
File metadataFile = new File(url.getPath());

OpenSamlFilesystemMetadataResolver openSamlResolver = new OpenSamlFilesystemMetadataResolver(openSamlObjects.getParserPool(),
indexWriter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class TestObjectGenerator {
new FilesystemMetadataResolver().with {
it.name = 'FilesystemMetadata'
it.xmlId = 'FilesystemMetadata'
it.metadataFile = 'some metadata filename'
it.metadataFile = 'metadata.xml'

it.reloadableMetadataResolverAttributes = new ReloadableMetadataResolverAttributes().with {
it.minRefreshDelay = 'PT5M'
Expand All @@ -459,7 +459,7 @@ class TestObjectGenerator {
new FileBackedHttpMetadataResolver().with {
it.name = 'HTTPMetadata'
it.xmlId = 'HTTPMetadata'
it.backingFile = '%{idp.home}/metadata/incommonmd.xml'
it.backingFile = 'incommonmd.xml'
it.metadataURL = 'http://md.incommon.org/InCommon/InCommon-metadata.xml'

it.reloadableMetadataResolverAttributes = new ReloadableMetadataResolverAttributes().with {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/test/resources/conf/278.2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</MetadataProvider>
<MetadataProvider id="HTTPMetadata"
xsi:type="FileBackedHTTPMetadataProvider"
backingFile="%{idp.home}/metadata/incommonmd.xml"
backingFile="incommonmd.xml"
metadataURL="http://md.incommon.org/InCommon/InCommon-metadata.xml"
minRefreshDelay="PT5M"
maxRefreshDelay="PT1H"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/test/resources/conf/278.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</MetadataProvider>
<MetadataProvider id="HTTPMetadata"
xsi:type="FileBackedHTTPMetadataProvider"
backingFile="%{idp.home}/metadata/incommonmd.xml"
backingFile="incommonmd.xml"
metadataURL="http://md.incommon.org/InCommon/InCommon-metadata.xml"
minRefreshDelay="PT5M"
maxRefreshDelay="PT1H"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/test/resources/conf/520.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xsi:type="ChainingMetadataProvider">
<MetadataProvider id="FilesystemMetadata"
maxRefreshDelay="PT1H"
metadataFile="some metadata filename"
metadataFile="metadata.xml"
minRefreshDelay="PT5M"
refreshDelayFactor="0.75"
xsi:type="FilesystemMetadataProvider"/>
Expand Down
2 changes: 1 addition & 1 deletion backend/src/test/resources/conf/532.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xsi:schemaLocation="urn:mace:shibboleth:2.0:metadata http://shibboleth.net/schema/idp/shibboleth-metadata.xsd urn:mace:shibboleth:2.0:resource http://shibboleth.net/schema/idp/shibboleth-resource.xsd urn:mace:shibboleth:2.0:security http://shibboleth.net/schema/idp/shibboleth-security.xsd urn:oasis:names:tc:SAML:2.0:metadata http://docs.oasis-open.org/security/saml/v2.0/saml-schema-metadata-2.0.xsd urn:oasis:names:tc:SAML:2.0:assertion http://docs.oasis-open.org/security/saml/v2.0/saml-schema-assertion-2.0.xsd">
<MetadataProvider id="HTTPMetadata"
xsi:type="FileBackedHTTPMetadataProvider"
backingFile="%{idp.home}/metadata/incommonmd.xml"
backingFile="incommonmd.xml"
metadataURL="http://md.incommon.org/InCommon/InCommon-metadata.xml"
minRefreshDelay="PT5M"
maxRefreshDelay="PT1H"
Expand Down

0 comments on commit 9caacdc

Please sign in to comment.