Skip to content

Test fails with StackOverflowError #89

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

Open
prestontim opened this issue Jul 26, 2016 · 0 comments
Open

Test fails with StackOverflowError #89

prestontim opened this issue Jul 26, 2016 · 0 comments

Comments

@prestontim
Copy link

I'm attempting to write a Spock test that's verifying a custom 'artifactory.license' property that I'm setting on the artifactoryPublish task. The problem is that every time I try to access the task.properties property, the test throws a StackOverflowError.

The entirety of my test case is below. Can somebody please tell me what I'm doing wrong here? (I am currently using org.jfrog.buildinfo:build-info-extractor-gradle:4.4.0.)

import org.gradle.api.Project
import org.gradle.testfixtures.ProjectBuilder
import spock.lang.Specification

public class ArtifactoryTest extends Specification {
    def "project has license property set on artifactoryPublish task"() {
        given: "a test project"
        Project proj = ProjectBuilder.builder().build()
        proj.version = '1.0-SNAPSHOT'
        proj.group = 'com.demo'
        proj.description = 'Test case'

        when: "the plugin is applied"
        proj.apply(plugin: 'com.jfrog.artifactory')
        proj.artifactoryPublish {
            properties = ['artifactory.licenses': 'foo-bar-license']
        }
        proj.evaluate()

        then: "the project has the license property set"
        def task = proj.tasks.getByName("artifactoryPublish")
        task.properties.get('artifactory.licenses') == 'foo-bar-license'
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant