Skip to content

Commit

Permalink
Refactored integration test scripts (#1103)
Browse files Browse the repository at this point in the history
Signed-off-by: dhoard <[email protected]>
  • Loading branch information
dhoard authored Dec 19, 2024
1 parent 5b1af61 commit a68ea3a
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/content/1.1.0/building_testing/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,15 @@ cd jmx_exporter
./mvnw clean verify
```

**Notes**
### Scripts

Test scripts are available to build and run various integration test suite scenarios

- The `regression-test.sh` shell script can be used to build and run the integration test suite using all test containers.
- `./regression-test.sh`
- Output is captured and logged to `regression-test.log`.
- [run-quick-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-quick-test.sh)
- [run-smoke-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-smoke-test.sh)
- [run-regression-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-regression-test.sh)
- [run-targeted-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-targeted-test.sh)
- [run-stress-test.sh](https://github.com/prometheus/jmx_exporter/blob/main/run-stress-test.sh)

### Output

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions run-targeted-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

#
# Copyright (C) 2022-present The Prometheus jmx_exporter Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#
# Bash script to build, package, and run the tests (single Docker container)
#

if [[ "$#" -ne 2 ]]; then
echo "Usage: $0 <JAVA DOCKER IMAGE> <PROMETHEUS DOCKER IMAGE>"
exit 1
fi

(
export JAVA_DOCKER_IMAGES="$1"
export PROMETHEUS_DOCKER_IMAGES="$2"
docker pull "$JAVA_DOCKER_IMAGES"
docker pull "$PROMETHEUS_DOCKER_IMAGES"
./mvnw clean verify
) 2>&1 | tee targeted-test.log

0 comments on commit a68ea3a

Please sign in to comment.