Skip to Content.
Sympa Menu

shibboleth-dev - Re: tests-conf

Subject: Shibboleth Developers

List archive

Re: tests-conf


Chronological Thread 
  • From: Tom Scavo <>
  • To: Shibboleth Development <>
  • Subject: Re: tests-conf
  • Date: Tue, 23 Aug 2005 18:10:20 -0400
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RuAv9zjzkpTgvHtsMhGF1w2a1gk8VPjYkLWt0L9HUrPq1Xb8L+KDx47ZCi5CW5PfHad8lNMn9jMUZX2WZSC6Ulic/na/vDLW49U+yqgW/yayNNrqydxHkqrIzdePHHWZ3PGqShPchOxLnGG/7LdSEafo5F47aX51wYuM45WMbLE=

On 8/23/05, Tom Scavo
<>
wrote:
> An extension stores source and other resources on the classpath in
> directories src and src-conf, respectively. Similarly, does it make
> sense to have tests-conf in addition to tests? Without it, I don't
> know how to test classes that expect resources on the classpath. Any
> suggestions?

I found a workaround. I have the following resource in my extension:

src-conf/conf/gridshib-idp-config.properties

This resource gets copied to

build/tests/conf

as it should, but the placeholders are not replaced. To workaround
this, I created another resource

src-conf/conf/test-gridshib-idp-config.properties

with the placeholders replaced with reasonable values. Now when the
JUnit test runs, I tell it to look for
test-gridshib-idp-config.properties (instead of
gridshib-idp-config.properties) on the classpath, which works since
${ext.classes} is on the test classpath.

I had to create a bit of machinery to allow arbitrary config files,
but it works. On the other hand, test-gridshib-idp-config.properties
is bundled in the JAR, which doesn't cause any serious problems as far
as I can tell, but it would be better if it weren't in the extension
JAR. So my question is:

Can replaced versions of all resources in src-conf be made available
to the test framework?

Thanks,
Tom


  • tests-conf, Tom Scavo, 08/23/2005
    • Re: tests-conf, Tom Scavo, 08/23/2005

Archive powered by MHonArc 2.6.16.

Top of Page