-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Convert discovery-* from integTest to [yaml | java]RestTest or internalClusterTest #60084
Convert discovery-* from integTest to [yaml | java]RestTest or internalClusterTest #60084
Conversation
Pinging @elastic/es-core-infra (:Core/Infra/Build) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple minor comments, otherwise LGTM.
This also is another reminder that we need to get rid of these gross ant fixtures.
@@ -88,9 +90,10 @@ task createKey(type: LoggedExec) { | |||
'-keypass', 'keypass', | |||
'-storepass', 'keypass' | |||
} | |||
|
|||
//no unit tests | |||
test.enabled = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like one step forward and one step back. I assume this is also just to appease our testing conventions stuff? If so I feel like this should not be a failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup. However, it is a bit more rare to have no unit tests (at least until i start converting the qa projects). For this one we will probably want to toggle the enable/disable the test task if the directory exists or not. I can look into that for a follow up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we are going to have this all over the place for the qa projects that contain only rest tests.
@@ -66,19 +65,26 @@ integTest.enabled = false | |||
*/ | |||
['KeyStore', 'EnvVariables', 'SystemProperties', 'ContainerCredentials', 'InstanceProfile'].forEach { action -> | |||
AntFixture fixture = tasks.create(name: "ec2Fixture${action}", type: AntFixture) { | |||
dependsOn compileTestJava | |||
env 'CLASSPATH', "${-> project.sourceSets.test.runtimeClasspath.asPath}" | |||
dependsOn compileYamlRestTestJava |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really be dependsOn project.sourceSets.yamlRestTest.runtimeClasspath
. Just compileYamlRestTestJava
doesn't include a) processing resources or b) upstream runtime dependencies so we risk a race condition here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 01114f9
@@ -42,26 +40,26 @@ restResources { | |||
|
|||
/** A task to start the GCEFixture which emulates a GCE service **/ | |||
task gceFixture(type: AntFixture) { | |||
dependsOn compileTestJava | |||
env 'CLASSPATH', "${-> project.sourceSets.test.runtimeClasspath.asPath}" | |||
dependsOn compileYamlRestTestJava |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, we should depending on the source set runtime classpath here, not just the compile task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 01114f9
@elasticmachine update branch |
@elasticmachine update branch |
…alClusterTest (elastic#60084) For OSS plugins that begin with discovery-*, the integTest task is now a no-op and all of the tests are now executed via a test, yamlRestTest, javaRestTest, or internalClusterTest. related: elastic#56841 related: elastic#59444
For OSS plugins that begin with
discovery-*
, theintegTest
task is now a no-op and all of the tests are now executed via a test,
yamlRestTest
,javaRestTest
, orinternalClusterTest
.related: #56841
related: #59444