Skip to content

Commit

Permalink
[NOJIRA]
Browse files Browse the repository at this point in the history
Replaced /tmp with <userhome>/groovytest
  • Loading branch information
Bill Smith committed Aug 23, 2018
1 parent a68bcf6 commit 34b084e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ class MetadataResolversControllerIntegrationTests extends Specification {
result.statusCodeValue == 201
result.headers.Location[0].contains(BASE_URI)

cleanup:
def userHome = System.getProperty("user.home")
def tmpDirectory = new File(userHome + File.separator + 'groovytest')
if (tmpDirectory.exists()) {
tmpDirectory.deleteDir()
}

where:
resolverType | _
'DynamicHttp' | _
Expand Down Expand Up @@ -196,6 +203,13 @@ class MetadataResolversControllerIntegrationTests extends Specification {
then:
updatedResolverMap.name == 'Updated DynamicHttpMetadataResolver'

cleanup:
def userHome = System.getProperty("user.home")
def tmpDirectory = new File(userHome + File.separator + 'groovytest')
if (tmpDirectory.exists()) {
tmpDirectory.deleteDir()
}

where:
resolverType | _
'DynamicHttp' | _
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,15 @@ class TestObjectGenerator {
}

LocalDynamicMetadataResolver localDynamicMetadataResolver() {
def userHome = System.getProperty("user.home")
def tmpDirectory = new File(userHome + File.separator + 'groovytest')
if (!tmpDirectory.exists()) {
tmpDirectory.mkdir()
}
new LocalDynamicMetadataResolver().with {
it.name = 'LocalDynamic'
it.xmlId = 'LocalDynamic'
it.sourceDirectory = '/tmp'
it.sourceDirectory = userHome + File.separator + 'groovytest'
it.dynamicMetadataResolverAttributes = new DynamicMetadataResolverAttributes().with {
it
}
Expand Down

0 comments on commit 34b084e

Please sign in to comment.