You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
}
}
The text was updated successfully, but these errors were encountered:
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.)
The text was updated successfully, but these errors were encountered: