Skip to content

Commit a61e214

Browse files
test: require checked-in dedup fixtures
1 parent 591fe4f commit a61e214

4 files changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/dropwizard-dedup.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ jobs:
2626
java-version: ${{ matrix.java-version }}
2727
cache: maven
2828

29+
- name: Verify checked-in replay fixtures
30+
working-directory: dropwizard-dedup
31+
run: |
32+
set -euo pipefail
33+
fixture_count="$(find keploy -path '*/tests/test-*.yaml' -size +100c | wc -l | tr -d ' ')"
34+
tracked_count="$(git ls-files 'keploy/test-set-*/tests/test-*.yaml' | wc -l | tr -d ' ')"
35+
test "${fixture_count}" = "16"
36+
test "${tracked_count}" = "16"
37+
2938
- name: Build dropwizard-dedup without Keploy compile dependency
3039
working-directory: dropwizard-dedup
3140
run: mvn -B -DskipTests clean package

.github/workflows/java-dedup.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ jobs:
2626
java-version: ${{ matrix.java-version }}
2727
cache: maven
2828

29+
- name: Verify checked-in replay fixtures
30+
working-directory: java-dedup
31+
run: |
32+
set -euo pipefail
33+
fixture_count="$(find keploy -path '*/tests/test-*.yaml' -size +100c | wc -l | tr -d ' ')"
34+
tracked_count="$(git ls-files 'keploy/test-set-*/tests/test-*.yaml' | wc -l | tr -d ' ')"
35+
test "${fixture_count}" = "1000"
36+
test "${tracked_count}" = "1000"
37+
2938
- name: Build java-dedup without Keploy compile dependency
3039
working-directory: java-dedup
3140
run: mvn -B -DskipTests clean package

dropwizard-dedup/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This sample validates that Keploy Java dynamic deduplication works for a non-Spring Java service. The app is a Dropwizard/Jersey HTTP service and does not import or depend on the Keploy SDK at compile time.
44

5+
CI does not record this sample. The `keploy/` directory contains checked-in fixtures, so Enterprise CI only builds the app and runs replay with `--dedup`. When the sample behavior changes, record the fixtures locally and push the updated `keploy/` files.
6+
57
Build without Keploy on the compile classpath:
68

79
```bash

java-dedup/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A Spring Boot application used by Keploy CI to validate Java dynamic deduplication. It mirrors the Go dedup sample by exposing a broad set of endpoints and committing 1000 replay fixtures across four testsets.
44

5-
CI does not record this sample. The `keploy/` directory is checked in so the pipeline only builds the app and runs replay with `--dedup`.
5+
CI does not record this sample. The `keploy/` directory is checked in so the pipeline only builds the app and runs replay with `--dedup`. When the sample behavior changes, record the fixtures locally and push the updated `keploy/` files.
66

77
The Keploy Java SDK is attached as a Java agent at replay time. The sample does not compile against `io.keploy:keploy-sdk` and does not import Keploy classes in application code.
88

0 commit comments

Comments
 (0)