Skip to content

Commit 5e2c51b

Browse files
Copilotdrag0sd0g
andcommitted
Address code review feedback: remove inappropriate 405 status and improve workflow condition clarity
Co-authored-by: drag0sd0g <612485+drag0sd0g@users.noreply.github.com>
1 parent 296bcc9 commit 5e2c51b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ env:
2424
jobs:
2525
build-and-push:
2626
runs-on: ubuntu-latest
27-
# Only run if CodeQL workflow succeeded or if triggered directly
27+
# Run on: manual triggers, successful CodeQL completion, or tag pushes
28+
# workflow_run handles PR/push events after CodeQL succeeds
29+
# Tag pushes trigger directly for releases
2830
if: |
2931
github.event_name == 'workflow_dispatch' ||
3032
github.event.workflow_run.conclusion == 'success' ||
31-
(github.event_name == 'push' && contains(github.ref, 'tags'))
33+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
3234
permissions:
3335
contents: read
3436
packages: write

integration-tests/src/test/java/com/tools/integration/FileStorageIntegrationTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,14 @@ public void testListMultipleFiles() {
209209
@Order(8)
210210
@DisplayName("Unhappy Path: Should fail to upload file without payload")
211211
public void testUploadWithoutPayload() {
212+
// Posting without multipart payload should return 400 or 500
212213
given()
213214
.contentType("multipart/form-data")
214215
.pathParam("fileName", "no-payload-test.txt")
215216
.when()
216217
.post("/v1/files/{fileName}")
217218
.then()
218-
.statusCode(anyOf(is(400), is(405), is(500)));
219+
.statusCode(anyOf(is(400), is(500)));
219220
}
220221

221222
@Test

0 commit comments

Comments
 (0)