Skip to content

Commit bad9efe

Browse files
committed
Add a step to exhaustive tests for observabilitySRE accetpance testing
This commit shows the proposed pattern for adding acceptance testing for the observability SRE image. This will run when exhaustive tests run. A new gradle task will hook in to rspec similar to how it is done for the smoke tests. The main difference is that instead of building a container, the latest is pulled from the container registry and run on a fips configured host VM.
1 parent afab0f9 commit bad9efe

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.buildkite/scripts/exhaustive-tests/generate-steps.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,24 @@ def acceptance_docker_steps()-> list[typing.Any]:
168168

169169
return steps
170170

171+
def fips_test_runner_step() -> dict[str, typing.Any]:
172+
step = {
173+
"label": "Observability SRE Acceptance Tests",
174+
"key": "observabilitySRE-acceptance-tests",
175+
"agents": {
176+
"provider": "aws",
177+
"instanceType": "m6i.xlarge",
178+
"diskSizeGb": 60,
179+
"instanceMaxAge": 1440,
180+
"imagePrefix": "logstash-ubuntu-2204-fips"
181+
},
182+
"retry": {"automatic": [{"limit": 1}]},
183+
"command": LiteralScalarString("""#!/usr/bin/env bash
184+
./gradlew observabilitySREacceptanceTests --stacktrace
185+
"""),
186+
}
187+
return step
188+
171189
if __name__ == "__main__":
172190
LINUX_OS_ENV_VAR_OVERRIDE = os.getenv("LINUX_OS")
173191
WINDOWS_OS_ENV_VAR_OVERRIDE = os.getenv("WINDOWS_OS")
@@ -215,5 +233,12 @@ def acceptance_docker_steps()-> list[typing.Any]:
215233
"steps": acceptance_docker_steps(),
216234
})
217235

236+
structure["steps"].append({
237+
"group": "Observability SRE Acceptance Tests",
238+
"key": "acceptance-observability-sre",
239+
"depends_on": ["testing-phase"],
240+
"steps": [fips_test_runner_step()],
241+
})
242+
218243
print('# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json')
219244
YAML().dump(structure, sys.stdout)

x-pack/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ tasks.register("buildFipsValidationGem") {
7575
rake(rootProject.projectDir, rootProject.buildDir, 'plugin:build-fips-validation-plugin')
7676
}
7777
}
78+
7879
tasks.register("observabilitySREsmokeTests", Test) {
7980
description = "Run ObservabilitySRE smoke tests using docker-compose and RSpec"
8081
// Need to have set up the ruby environment for rspec even through we are running in container
@@ -114,3 +115,10 @@ tasks.register("observabilitySREsmokeTests", Test) {
114115
delete fileTree("distributions/internal/observabilitySRE/qa/smoke/docker/certs").include("*.key", "*.crt", "*.csr", "*.srl")
115116
}
116117
}
118+
119+
tasks.register("observabilitySREacceptanceTests", Test) {
120+
description = "Run ObservabilitySRE acceptance tests"
121+
// Need to have set up the ruby environment for rspec even through we are running in container
122+
dependsOn(":bootstrap", ":logstash-core:assemble", ":installDevelopmentGems")
123+
// TODO: hook in to rspec
124+
}

0 commit comments

Comments
 (0)