-
Notifications
You must be signed in to change notification settings - Fork 207
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
MAINT: refactoring existing e2e tests on trace data ingestion #512
Changes from 6 commits
e3505fb
f55d2f3
3cefc1c
1df2c70
5d1d67d
27d059a
57f77ca
86575df
146a766
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Data Prepper End-to-end Tests | ||
|
||
This module includes all e2e tests for data-prepper. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
subprojects { | ||
buildscript { | ||
repositories { | ||
maven { | ||
url "https://plugins.gradle.org/m2/" | ||
} | ||
} | ||
dependencies { | ||
classpath 'com.bmuschko:gradle-docker-plugin:7.0.0' | ||
} | ||
} | ||
|
||
sourceSets { | ||
integrationTest { | ||
java { | ||
compileClasspath += main.output + test.output | ||
runtimeClasspath += main.output + test.output | ||
srcDir file('src/integrationTest/java') | ||
} | ||
resources.srcDir file('src/integrationTest/resources') | ||
} | ||
} | ||
|
||
configurations { | ||
integrationTestImplementation.extendsFrom testImplementation | ||
integrationTestRuntime.extendsFrom testRuntime | ||
} | ||
|
||
def DATA_PREPPER_CORE_JAR = project(':data-prepper-core').jar | ||
|
||
task copyDataPrepperJar(type: Copy) { | ||
dependsOn DATA_PREPPER_CORE_JAR | ||
from("${project(':data-prepper-core').jar.archivePath}") | ||
into 'build/bin' | ||
} | ||
|
||
ext { | ||
data_prepper_jar_filepath = "build/bin/${DATA_PREPPER_CORE_JAR.archiveName}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use Groovy for Gradle build files and should follow the correct coding standards. This should be camelCase: Also, this value should be scoped correctly. I'm guessing this should be the root project. In which case it should look more like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually it should be the scope of qa-test project, I will replace it with project(':qa-test').buildDir There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of that, please use |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Trace Data Ingestion End-to-end Tests | ||
|
||
This module includes e2e tests for trace data ingestion supported by data-prepper. | ||
|
||
## Raw Span Ingestion Pipeline End-to-end test | ||
|
||
Run from current directory | ||
``` | ||
./gradlew :rawSpanEndToEndTest | ||
``` | ||
or from project root directory | ||
``` | ||
./gradlew :e2e:trace:rawSpanEndToEndTest | ||
``` | ||
|
||
## Raw Span Ingestion Pipelines Compatibility End-to-end test | ||
|
||
Run from current directory | ||
``` | ||
./gradlew :rawSpanCompatibilityEndToEndTest | ||
``` | ||
or from project root directory | ||
``` | ||
./gradlew :e2e:trace:rawSpanCompatibilityEndToEndTest | ||
``` | ||
|
||
## Service Map Ingestion Pipelines End-to-end test | ||
|
||
Run from current directory | ||
``` | ||
./gradlew :serviceMapEndToEndTest | ||
``` | ||
or from project root directory | ||
``` | ||
./gradlew :e2e:trace:serviceMapEndToEndTest | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,6 @@ include 'data-prepper-plugins:blocking-buffer' | |
include 'data-prepper-plugins:http-source' | ||
include 'data-prepper-plugins:grok-prepper' | ||
include 'data-prepper-logstash-configuration' | ||
include 'e2e' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to raise the question of what name to use here. This uses I don't like the name Also, the core OpenSearch project uses There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dlvenable I also went back and forth between qa and e2e. I think qa-test looks good to me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cmanning09 @graytaylor0 , Any thoughts on the name? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually e2e-test might be better since e2e is already populated in the repo 😄 |
||
include 'e2e:trace' | ||
|
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.
I try to avoid
def
s in Gradle builds. Is there a way to clean this up?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.
I think it is not bad practice since it appeared in docs: https://docs.gradle.org/current/userguide/more_about_tasks.html
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.
I don't think it is bad practice, but I do try to avoid them when possible. But, if there isn't a better way, that is fine too.
Also, this isn't a constant, so it should probably also be camelCase:
dataPrepperCoreJar
.