From dd8b933ec3adc288e632d033a2fb7409e64b7899 Mon Sep 17 00:00:00 2001 From: gnezim Date: Sat, 25 Apr 2026 02:43:15 +0300 Subject: [PATCH] ci: mock fixtures for Jenkins trigger/poll tests --- tests/ci/fixtures/jenkins-failure-flow.json | 15 +++++++++++++++ tests/ci/fixtures/jenkins-success-flow.json | 18 ++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/ci/fixtures/jenkins-failure-flow.json create mode 100644 tests/ci/fixtures/jenkins-success-flow.json diff --git a/tests/ci/fixtures/jenkins-failure-flow.json b/tests/ci/fixtures/jenkins-failure-flow.json new file mode 100644 index 00000000..68ca4ff9 --- /dev/null +++ b/tests/ci/fixtures/jenkins-failure-flow.json @@ -0,0 +1,15 @@ +{ + "trigger_response": { + "status": 201, + "headers": { + "Location": "http://jenkins.test/queue/item/78/" + } + }, + "queue_polls": [ + {"status": 200, "body": {"executable": {"number": 43, "url": "http://jenkins.test/job/Aeroflot2/job/Flights-Front-Dev/43/"}}} + ], + "build_polls": [ + {"status": 200, "body": {"building": true, "result": null, "number": 43}}, + {"status": 200, "body": {"building": false, "result": "FAILURE", "number": 43}} + ] +} diff --git a/tests/ci/fixtures/jenkins-success-flow.json b/tests/ci/fixtures/jenkins-success-flow.json new file mode 100644 index 00000000..ac181f58 --- /dev/null +++ b/tests/ci/fixtures/jenkins-success-flow.json @@ -0,0 +1,18 @@ +{ + "trigger_response": { + "status": 201, + "headers": { + "Location": "http://jenkins.test/queue/item/77/" + } + }, + "queue_polls": [ + {"status": 200, "body": {"why": "in queue", "executable": null}}, + {"status": 200, "body": {"why": "in queue", "executable": null}}, + {"status": 200, "body": {"executable": {"number": 42, "url": "http://jenkins.test/job/Aeroflot2/job/Flights-Front-Dev/42/"}}} + ], + "build_polls": [ + {"status": 200, "body": {"building": true, "result": null, "number": 42}}, + {"status": 200, "body": {"building": true, "result": null, "number": 42}}, + {"status": 200, "body": {"building": false, "result": "SUCCESS", "number": 42}} + ] +}