Skip to content

Commit 6339395

Browse files
authored
test(server): ensure maven-metadata.xml returns existing version (#1395)
It makes the test catch a case when the endpoint returns HTTP 200, but the contents is malformed.
1 parent 270a54f commit 6339395

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/bindings-server.main.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ workflow(
8686

8787
run(
8888
name = "Fetch maven-metadata.xml for top-level action",
89-
command = "curl --fail http://localhost:8080/binding/actions/checkout/maven-metadata.xml",
89+
command = "curl --fail http://localhost:8080/binding/actions/checkout/maven-metadata.xml | grep '<version>v4</version>'",
9090
)
9191
run(
9292
name = "Fetch maven-metadata.xml for nested action",
93-
command = "curl --fail http://localhost:8080/binding/actions/cache__save/maven-metadata.xml",
93+
command = "curl --fail http://localhost:8080/binding/actions/cache__save/maven-metadata.xml | grep '<version>v4</version>'",
9494
)
9595
}
9696

.github/workflows/bindings-server.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
.github/workflows/test-script-consuming-jit-bindings.main.kts
4848
- id: 'step-5'
4949
name: 'Fetch maven-metadata.xml for top-level action'
50-
run: 'curl --fail http://localhost:8080/binding/actions/checkout/maven-metadata.xml'
50+
run: 'curl --fail http://localhost:8080/binding/actions/checkout/maven-metadata.xml | grep ''<version>v4</version>'''
5151
- id: 'step-6'
5252
name: 'Fetch maven-metadata.xml for nested action'
53-
run: 'curl --fail http://localhost:8080/binding/actions/cache__save/maven-metadata.xml'
53+
run: 'curl --fail http://localhost:8080/binding/actions/cache__save/maven-metadata.xml | grep ''<version>v4</version>'''
5454
deploy:
5555
name: 'Deploy to DockerHub'
5656
runs-on: 'ubuntu-latest'

0 commit comments

Comments
 (0)