test: make pinned printing contract fixtures self-contained
QRun-IO/ci-policy: ci / fork-guard (pull_request) Skipped
QRun-IO/ci-policy: ci / gradle-0 (pull_request) Skipped
QRun-IO/ci-policy: ci / java-docker-1 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-3 (pull_request) Skipped
QRun-IO/ci-policy: ci / node-4 (pull_request) Skipped
QRun-IO/ci-policy: ci / source-config-5 (pull_request) Skipped
QRun-IO/ci-policy: ci / not-enrolled (pull_request) Skipped
QRun-IO/ci-policy: Shared Java Maven CI / verify (pull_request) Successful in 3m50s
QRun-IO/ci-policy: Shared Java Maven CI / secrets (pull_request) Successful in 17s
QRun-IO/ci-policy: Shared Java Maven CI / gate (pull_request) Successful in 10s
QRun-IO/ci-policy: ci / java-maven-2 (pull_request) Successful in 4m6s
QRun-IO/ci-policy: ci / ci-result (pull_request) Successful in 4s
QRun-IO/ci-policy: ci / fork-guard (push) Skipped
QRun-IO/ci-policy: ci / gradle-0 (push) Skipped
QRun-IO/ci-policy: ci / java-docker-1 (push) Skipped
QRun-IO/ci-policy: ci / node-3 (push) Skipped
QRun-IO/ci-policy: ci / node-4 (push) Skipped
QRun-IO/ci-policy: ci / source-config-5 (push) Skipped
QRun-IO/ci-policy: ci / not-enrolled (push) Skipped
QRun-IO/ci-policy: Shared Java Maven CI / secrets (push) Successful in 15s
QRun-IO/ci-policy: Shared Java Maven CI / verify (push) Successful in 3m36s
QRun-IO/ci-policy: Shared Java Maven CI / gate (push) Successful in 9s
QRun-IO/ci-policy: ci / java-maven-2 (push) Successful in 3m47s
QRun-IO/ci-policy: ci / ci-result (push) Successful in 5s

Keep the exact existing protocol fixture bytes and the explicit cross-repository override. Default Maven verification no longer depends on a sibling checkout.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Co-Authored-By: Codex <noreply@openai.com>
This commit was merged in pull request #10.
This commit is contained in:
committed 2026-11-01 20:52:57 -06:00
1 parent aaa4a9ff03
commit fc99caf85e
18 files changed
+127 -1

No files matched your search

@@ -50,7 +50,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
class PrintingContractTest
{
private static final String ADMIN = "contract-test-administrator-token";
private static final Path FIXTURES = Path.of(System.getProperty("printing.protocol.fixtures", "../qqq-print-protocol/fixtures"));
private static final Path FIXTURES = Path.of(System.getProperty("printing.protocol.fixtures", "src/test/resources/protocol-fixtures"));
/** Default hosts cannot consume enrollment codes through the legacy bearer transport. */
@@ -0,0 +1,30 @@
<!--
Copyright 2026 Kingsrook, LLC
SPDX-License-Identifier: Apache-2.0
-->
# Protocol fixtures used by PrintingContractTest
Unaltered copies of files from the `fixtures/` directory of the canonical `qqq-print-protocol` repository
at commit `42c0d249f81395f00408ec0f92638dcbbf5deb03` (the commit this source pins), so the contract tests run
without a sibling checkout. Only the files the test reads are copied:
- `action-refresh-inventory.request.json`
- `action-revoke.request.json`
- `approval.request.json`
- `control-inventory-refreshed.receipt.json`
- `control-poll.request.json`
- `create-enrollment.request.json`
- `device-retry.request.json`
- `device-test.request.json`
- `enroll.request.json`
- `heartbeat.request.json`
- `printers.request.json`
- `received.event.json`
- `spooled.event.json`
- `submit.request.json`
- `submitting.event.json`
- `test-label.zpl`
To check these against another protocol revision, run the tests with
`-Dprinting.protocol.fixtures=<path to that checkout's fixtures>`. When the pinned commit changes, replace these
files from that commit's `fixtures/` directory.
@@ -0,0 +1,5 @@
{
"requestId": "action-refresh-inventory-1",
"issuedAt": "2026-10-31T16:00:00Z",
"action": "REFRESH_INVENTORY"
}
@@ -0,0 +1,5 @@
{
"requestId": "action-revoke-1",
"issuedAt": "2026-10-31T16:00:00Z",
"action": "REVOKE"
}
@@ -0,0 +1,3 @@
{
"enabled": true
}
@@ -0,0 +1,5 @@
{
"receiptId": "receipt-inventory-refreshed-1",
"outcome": "INVENTORY_REFRESHED",
"completedAt": "2026-10-31T16:00:05Z"
}
@@ -0,0 +1,9 @@
{
"controlVersion": 1,
"agentVersion": "0.2.0-rc.1",
"capabilities": [
"REFRESH_INVENTORY",
"CANCEL_SPOOL"
],
"lastAppliedRevision": 0
}
@@ -0,0 +1,4 @@
{
"facilityId": "test-facility",
"deviceName": "Packing station"
}
@@ -0,0 +1 @@
{"requestId":"operator-retry-1","confirmDuplicateRisk":true}
@@ -0,0 +1 @@
{"printerId":"printer-zebra","format":"ZPL","requestId":"operator-test-1"}
@@ -0,0 +1,5 @@
{
"enrollmentCode": "EXAMPLE-NOT-A-REAL-CODE",
"deviceName": "Packing station",
"agentVersion": "0.1.0"
}
@@ -0,0 +1,3 @@
{
"agentVersion": "0.1.0"
}
@@ -0,0 +1,25 @@
{
"printers": [
{
"printerId": "laser-example",
"name": "Local Laser",
"driverName": "Example Laser Driver",
"portName": "USB001",
"status": "READY",
"formats": [
"PDF"
]
},
{
"printerId": "zebra-example",
"name": "Local Zebra",
"driverName": "Example Zebra Driver",
"portName": "USB002",
"status": "READY",
"formats": [
"PDF",
"ZPL"
]
}
]
}
@@ -0,0 +1,4 @@
{
"eventId": "event-received-example",
"status": "RECEIVED"
}
@@ -0,0 +1,6 @@
{
"eventId": "event-spooled-example",
"status": "SPOOLED",
"spoolerJobId": "42",
"message": "Accepted by the Windows spooler."
}
@@ -0,0 +1,12 @@
{
"deviceId": "device-example",
"printerId": "zebra-example",
"title": "QQQ cloud print test",
"format": "ZPL",
"contentBase64": "XlhBCl5GTzQwLDQwXkEwTiwzNiwzNl5GRFFRUSBjbG91ZCBwcmludCB0ZXN0XkZTCl5GTzQwLDkwXkEwTiwyNCwyNF5GRFByb3RvY29sIHYxIC0gb25lIHRlc3QgbGFiZWxeRlMKXlhaCg==",
"idempotencyKey": "protocol-fixture-label-v1",
"options": {
"copies": 1,
"scale": "ACTUAL_SIZE"
}
}
@@ -0,0 +1,4 @@
{
"eventId": "event-submitting-example",
"status": "SUBMITTING"
}
@@ -0,0 +1,4 @@
^XA
^FO40,40^A0N,36,36^FDQQQ cloud print test^FS
^FO40,90^A0N,24,24^FDProtocol v1 - one test label^FS
^XZ