Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -564,16 +564,18 @@ tasks.register("deleteLocalFilebeat", Delete) {
}

tasks.register("copyFilebeat") {
dependsOn = [downloadFilebeat, deleteLocalFilebeat]
dependsOn downloadFilebeat
inputs.files(tasks.named("downloadFilebeat"))
outputs.dir('./build/filebeat')
mustRunAfter tasks.named("unpackTarDistribution")
doLast {
delete('./build/filebeat')
copy {
from tarTree(resources.gzip(project.ext.filebeatDownloadLocation))
into "./build/"
}
file("./build/${project.ext.unpackedFilebeatName}").renameTo('./build/filebeat')
System.out.println "Unzipped ${project.ext.filebeatDownloadLocation} to ./build/filebeat"
System.out.println "Deleting ${project.ext.filebeatDownloadLocation}"
delete(project.ext.filebeatDownloadLocation)
}
}

Expand Down Expand Up @@ -659,17 +661,19 @@ tasks.register("deleteLocalEs", Delete) {
}

tasks.register("copyEs") {
dependsOn = [downloadEs, deleteLocalEs]
dependsOn downloadEs
inputs.files(tasks.named("downloadEs"))
outputs.dir('./build/elasticsearch')
mustRunAfter tasks.named("unpackTarDistribution")
doLast {
println "copyEs executing.."
delete('./build/elasticsearch')
copy {
from tarTree(resources.gzip(project.ext.elasticsearchDownloadLocation))
into "./build/"
}

file("./build/${project.ext.unpackedElasticsearchName}").renameTo('./build/elasticsearch')
println "Unzipped ${project.ext.elasticsearchDownloadLocation} to ./build/elasticsearch"
println "Deleting ${project.ext.elasticsearchDownloadLocation}"
}
}

Expand Down
4 changes: 4 additions & 0 deletions x-pack/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ The `LicenseManager` (`lib/license_checker/license_manager.rb`) polls Elasticsea

# Integration tests (requires running Elasticsearch)
./gradlew :logstash-xpack:rubyIntegrationTests

# Single integration spec
./gradlew :logstash-xpack:rubyIntegrationTests \
-PrubyIntegrationSpecs=qa/integration/management/multiple_pipelines_spec.rb
```

### Test Structure
Expand Down
4 changes: 4 additions & 0 deletions x-pack/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ tasks.register("rubyIntegrationTests", Test) {
inputs.files fileTree("${rootProject.projectDir}/Gemfile.lock")
inputs.files fileTree("${rootProject.projectDir}/logstash-core/lib")
systemProperty 'logstash.root.dir', projectDir.parent
if (project.hasProperty('rubyIntegrationSpecs')) {
systemProperty 'org.logstash.xpack.integration.specs', project.property('rubyIntegrationSpecs')
}
outputs.upToDateWhen { false }
include '/org/logstash/xpack/test/RSpecIntegrationTests.class'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public class RSpecIntegrationTests extends RSpecTests {

@Override
protected List<String> rspecArgs() {
return Arrays.asList("-fd", "qa/integration");
String specs = System.getProperty("org.logstash.xpack.integration.specs", "qa/integration");
return Arrays.asList("-fd", specs);
}

@Test
Expand Down
Loading