From 308627965479c45b2b8bb5f86b80d233ffffdf4b Mon Sep 17 00:00:00 2001 From: Mx Corey Frang Date: Thu, 12 Oct 2023 14:41:13 -0400 Subject: [PATCH] Callback POST to URL (#20) * first draft/testing callback post for each test run * fix header split * move callback to host side of arrangement * further cleanup from moving to host side * hide header param when set from environment * testing test * add new params to README * Change env parsing, update mock, PR feedback * update snapshots --- README.md | 11 +- package-lock.json | 87 ++++- package.json | 1 + src/agent/at-driver.js | 14 +- src/agent/driver-test-runner.js | 17 +- src/agent/messages.js | 4 + src/agent/mock-test-runner.js | 10 +- src/host/README.md | 2 + src/host/cli-run-plan.js | 36 +- src/host/main.js | 34 +- src/host/tests/cli-run-plan.js | 13 + src/host/tests/snapshots/agent.js.md | 360 ++++++++++++++++-- src/host/tests/snapshots/agent.js.snap | Bin 3190 -> 3462 bytes src/host/tests/snapshots/cli-run-plan.js.md | 44 ++- src/host/tests/snapshots/cli-run-plan.js.snap | Bin 726 -> 983 bytes 15 files changed, 584 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 96025c1..75d28a4 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Options: ## `aria-at-harness-host` ``` -$ bin/host.js run-plan --help +$ bin/host.js run-plan --help --show-hidden host.js run-plan [plan-files..] Run test plans @@ -54,9 +54,18 @@ Options: --reference-hostname [default: "localhost"] --plan-workingdir Directory "plan-files" are relative to [default: "."] + --plan-protocol [choices: "fork", "developer"] [default: "fork"] --agent-web-driver-url [default: "http://localhost:4444"] --agent-web-driver-browser [choices: "chrome", "firefox"] [default: "firefox"] --agent-at-driver-url [default: "http://localhost:4382"] + --agent-protocol [choices: "fork", "developer"] [default: "fork"] + --agent-quiet Disable all logging + --agent-debug Enable all logging + --agent-verbose Enable a subset of logging messages + --agent-mock [boolean] + --agent-mock-open-page [choices: "request", "skip"] + --callback-url URL to POST test results to as they complete + --callback-header Header to send with callback request --show-hidden Show hidden options [boolean] ``` diff --git a/package-lock.json b/package-lock.json index d727099..24459eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "hasInstallScript": true, "dependencies": { "express": "^4.17.1", + "node-fetch": "^3.3.2", "selenium-webdriver": "^4.1.0", "ws": "^8.3.0", "yargs": "^17.2.1" @@ -26,7 +27,7 @@ "prettier": "^2.4.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=16.0.0" } }, "node_modules/@babel/code-frame": { @@ -1111,6 +1112,14 @@ "node": ">=0.10.0" } }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, "node_modules/date-time": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz", @@ -1463,6 +1472,28 @@ "reusify": "^1.0.4" } }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/figures": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-4.0.0.tgz", @@ -1536,6 +1567,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -2568,6 +2610,41 @@ "node": ">= 0.6" } }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, "node_modules/nofilter": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", @@ -3478,6 +3555,14 @@ "node": ">= 0.8" } }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "engines": { + "node": ">= 8" + } + }, "node_modules/well-known-symbols": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", diff --git a/package.json b/package.json index 6ae23ca..654c3e9 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ }, "dependencies": { "express": "^4.17.1", + "node-fetch": "^3.3.2", "selenium-webdriver": "^4.1.0", "ws": "^8.3.0", "yargs": "^17.2.1" diff --git a/src/agent/at-driver.js b/src/agent/at-driver.js index 1c922b8..36ef53b 100644 --- a/src/agent/at-driver.js +++ b/src/agent/at-driver.js @@ -32,13 +32,21 @@ export class ATDriver { this.socket = socket; this.log = log; this.ready = new Promise(resolve => socket.once('open', () => resolve())).then(() => - this._send({ method: 'session.new', params: { capabilities: {} } }) + this._send({ method: 'session.new', params: { capabilities: {} } }).then( + ({ result: { capabilities } }) => { + this._capabilities = capabilities; + } + ) ); this.closed = new Promise(resolve => socket.once('close', () => resolve())); - this._nextId = 0; } + async getCapabilities() { + await this.ready; + return this._capabilities; + } + async quit() { this.log(AgentMessage.AT_DRIVER_COMMS, { direction: 'close' }); this.socket.close(); @@ -63,7 +71,7 @@ export class ATDriver { if (message.error) { throw new Error(message.error); } - return; + return message; } } } diff --git a/src/agent/driver-test-runner.js b/src/agent/driver-test-runner.js index 7c8fc52..3526a7e 100644 --- a/src/agent/driver-test-runner.js +++ b/src/agent/driver-test-runner.js @@ -31,6 +31,15 @@ export class DriverTestRunner { this.log = log; this.webDriver = webDriver; this.atDriver = atDriver; + this.collectedCapabilities = this.getCapabilities(); + } + + async getCapabilities() { + const capabilities = await this.webDriver.getCapabilities(); + const browserName = capabilities.get('browserName'); + const browserVersion = capabilities.get('browserVersion'); + const { atName, atVersion, platformName } = await this.atDriver.getCapabilities(); + return { atName, atVersion, browserName, browserVersion, platformName }; } /** @@ -77,6 +86,9 @@ export class DriverTestRunner { * @param {AriaATFile.CollectedTest} test */ async run(test) { + const capabilities = await this.collectedCapabilities; + await this.log(AgentMessage.CAPABILITIES, { capabilities }); + await this.log(AgentMessage.START_TEST, { id: test.info.testId, title: test.info.task }); await this.log(AgentMessage.OPEN_PAGE, { url: 'about:blank' }); @@ -135,8 +147,11 @@ export class DriverTestRunner { } } + const testId = test.info.testId; + return { - testId: test.info.testId, + testId, + capabilities, commands: commandsOutput, results, }; diff --git a/src/agent/messages.js b/src/agent/messages.js index bcd4d5f..ad8a417 100644 --- a/src/agent/messages.js +++ b/src/agent/messages.js @@ -29,6 +29,8 @@ export const AgentMessage = { NO_RUN_TEST_SETUP: 'noRunTestSetup', /** @type {'atDriverComms'} */ AT_DRIVER_COMMS: 'atDriverComms', + /** @type {'capabilities'} */ + CAPABILITIES: 'capabilities', }; export const AGENT_TEMPLATES = { @@ -44,6 +46,8 @@ export const AGENT_TEMPLATES = { [AgentMessage.NO_RUN_TEST_SETUP]: ({ referencePage }) => `Test reference, ${referencePage}, does not have a Run Test Setup button.`, [AgentMessage.AT_DRIVER_COMMS]: ({ direction, message }) => `AT-Driver: ${direction}: ${message}`, + [AgentMessage.CAPABILITIES]: ({ capabilities }) => + `Capabilities: ${JSON.stringify(capabilities)}`, }; export function createAgentLogger(messages = AGENT_TEMPLATES) { diff --git a/src/agent/mock-test-runner.js b/src/agent/mock-test-runner.js index 370f81d..1702ae0 100644 --- a/src/agent/mock-test-runner.js +++ b/src/agent/mock-test-runner.js @@ -59,6 +59,7 @@ export class MockTestRunner { return { command: command.id, expectation: assertion.expectation, + output: `mocked output for ${assertion.expectation}`, pass: await this.testAssertion(command, assertion), }; } @@ -83,7 +84,14 @@ export class MockTestRunner { ); return { testId: task.info.testId, - results: await task.commands.reduce( + capabilities: { + browserName: 'mock', + browserVersion: '1.0', + atName: 'mock', + atVersion: '1.0', + platformName: 'mock', + }, + commands: await task.commands.reduce( async (carry, command) => [ ...(await carry), ...(await task.assertions.reduce( diff --git a/src/host/README.md b/src/host/README.md index c35ab70..868787f 100644 --- a/src/host/README.md +++ b/src/host/README.md @@ -69,6 +69,8 @@ Options: --agent-verbose Enable a subset of logging messages --agent-mock [boolean] --agent-mock-open-page [choices: "request", "skip"] + --callback-url URL to POST test results to as they complete + --callback-header Header to send with callback request --show-hidden Show hidden options [boolean] ``` diff --git a/src/host/cli-run-plan.js b/src/host/cli-run-plan.js index ccce6e1..63b7d34 100644 --- a/src/host/cli-run-plan.js +++ b/src/host/cli-run-plan.js @@ -4,6 +4,7 @@ import path from 'path'; import { Readable } from 'stream'; +import fetch from 'node-fetch'; import yargs from 'yargs'; import { pickAgentCliOptions } from '../agent/cli.js'; @@ -25,6 +26,7 @@ export const describe = 'Run test plans'; export const builder = (args = yargs) => args .positional('plan-files', { describe: 'Files in a test plan' }) + .env('ARIA_AT') .options({ quiet: { conflicts: ['debug', 'verbose'], @@ -136,6 +138,24 @@ export const builder = (args = yargs) => choices: ['request', 'skip'], hidden: true, }, + 'callback-url': { + describe: 'URL to POST test results to as they complete', + }, + 'callback-header': { + describe: 'Header to send with callback request', + coerce(arg) { + if (!arg) { + return {}; + } + if (String(arg).indexOf(':') == -1) { + throw new Error('callback header must include a : to separate header name from value'); + } + // capture all non ":" characters, ignore :\s*, capture rest of string + const [, name, value] = arg.match(/^([^:]+):\s*(.*)$/); + + return { [name]: value }; + }, + }, }) .showHidden('show-hidden') .middleware(verboseMiddleware) @@ -169,7 +189,7 @@ async function verboseMiddleware(argv) { function mainMiddleware(argv) { argv.planWorkingdir = path.resolve(argv.planWorkingdir); - + mainFetchMiddleware(argv); mainLoggerMiddleware(argv); mainTestPlanMiddleware(argv); mainServerMiddleware(argv); @@ -177,6 +197,20 @@ function mainMiddleware(argv) { mainResultMiddleware(argv); } +function mainFetchMiddleware(argv) { + if (!argv.fetch) { + if (!argv.agentMock) { + argv.fetch = fetch; + } else { + argv.fetch = (...params) => + new Promise(resolve => { + console.log('Callback Fetch Mocked: ', ...params); + resolve(); + }); + } + } +} + function mainLoggerMiddleware(argv) { const { stderr, verbosity } = argv; diff --git a/src/host/main.js b/src/host/main.js index ee8d30b..97fbafc 100644 --- a/src/host/main.js +++ b/src/host/main.js @@ -22,7 +22,16 @@ import { * @param {AriaATCIHost.Agent} options.agent * @param {AriaATCIHost.EmitPlanResults} options.emitPlanResults */ -export async function hostMain({ log, plans, server, agent, emitPlanResults }) { +export async function hostMain({ + log, + plans, + server, + agent, + emitPlanResults, + callbackUrl, + callbackHeader, + fetch, +}) { log(HostMessage.START); const hostLogJob = startJob(async function (signal) { @@ -43,6 +52,8 @@ export async function hostMain({ log, plans, server, agent, emitPlanResults }) { log(HostMessage.START_AGENT); await agent.start({ referenceBaseUrl: serverDirectory.baseUrl }); + const callbackRequests = []; + for (const test of plan.tests) { log(HostMessage.START_TEST); const testLogJob = startJob(async function (signal) { @@ -54,8 +65,27 @@ export async function hostMain({ log, plans, server, agent, emitPlanResults }) { const file = plan.files.find(({ name }) => name === test.filepath); const result = await agent.run(JSON.parse(textDecoder.decode(file.bufferData))); + if (callbackUrl) { + const headers = { + 'Content-Type': 'application/json', + ...(callbackHeader || {}), + }; + const { testId, capabilities, commands } = result; + const body = JSON.stringify({ + testId, + capabilities, + responses: commands.map(({ output }) => output), + }); + callbackRequests.push( + fetch(callbackUrl, { + method: 'post', + body, + headers, + }) + ); + } plan = addTestResultToTestPlan(plan, test.filepath, result); - + await Promise.allSettled(callbackRequests); await testLogJob.cancel(); } diff --git a/src/host/tests/cli-run-plan.js b/src/host/tests/cli-run-plan.js index 99365fa..8e7e0aa 100644 --- a/src/host/tests/cli-run-plan.js +++ b/src/host/tests/cli-run-plan.js @@ -38,6 +38,19 @@ test('plan3', async t => { ); }); +test('plan3 with callback', async t => { + t.snapshot( + await spawnRunPlan([ + '--plan-workingdir=fixtures/host-bin/plan3', + '"**"', + '--agent-mock', + '--debug', + '--callback-url=http://callback.url/', + '--callback-header=test:header:multiple:colon', + ]) + ); +}); + async function spawnRunPlan(args) { const dirname = path.dirname(fileURLToPath(import.meta.url)); const hostBin = path.join(dirname, '../../../bin/host.js'); diff --git a/src/host/tests/snapshots/agent.js.md b/src/host/tests/snapshots/agent.js.md index 689fb61..26907a2 100644 --- a/src/host/tests/snapshots/agent.js.md +++ b/src/host/tests/snapshots/agent.js.md @@ -293,10 +293,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"config":{}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -349,10 +357,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"config":{"debug":true}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -405,10 +421,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"config":{"verbose":["start"]}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -440,10 +464,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -496,10 +528,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"protocol":"fork","config":{}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -552,10 +592,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"protocol":"fork","config":{"debug":true}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -608,10 +656,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"protocol":"fork","config":{"verbose":["start"]}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -643,10 +699,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -699,10 +763,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"protocol":"developer","config":{}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -735,10 +807,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"protocol":"developer","config":{"debug":true}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -771,10 +851,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"protocol":"developer","config":{"verbose":["start"]}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -807,10 +895,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -843,10 +939,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"config":{}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -856,10 +960,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"config":{}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -923,10 +1035,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"config":{"debug":true}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -936,10 +1056,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"config":{"debug":true}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1003,10 +1131,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"config":{"verbose":["start"]}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1016,10 +1152,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"config":{"verbose":["start"]}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1051,10 +1195,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1064,10 +1216,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1131,10 +1291,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"fork","config":{}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1144,10 +1312,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"fork","config":{}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1211,10 +1387,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"fork","config":{"debug":true}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1224,10 +1408,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"fork","config":{"debug":true}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1291,10 +1483,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"fork","config":{"verbose":["start"]}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1304,10 +1504,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"fork","config":{"verbose":["start"]}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1339,10 +1547,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1352,10 +1568,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"fork","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1419,10 +1643,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"developer","config":{}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1432,10 +1664,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"developer","config":{}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1479,10 +1719,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"developer","config":{"debug":true}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1492,10 +1740,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"developer","config":{"debug":true}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1539,10 +1795,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"developer","config":{"verbose":["start"]}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1552,10 +1816,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"developer","config":{"verbose":["start"]}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], @@ -1599,10 +1871,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 1) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW', expectation: 'role up', + output: 'mocked output for role up', pass: true, }, ], @@ -1612,10 +1892,18 @@ Generated by [AVA](https://avajs.dev). > {"tests":[1,2],"options":{"protocol":"developer","config":{"referenceBaseUrl":{"protocol":"http","hostname":"localhost","port":1234,"pathname":"/path"}}}}: controller.run(test 2) { - results: [ + capabilities: { + atName: 'mock', + atVersion: '1.0', + browserName: 'mock', + browserVersion: '1.0', + platformName: 'mock', + }, + commands: [ { command: 'UP_ARROW,DOWN_ARROW', expectation: 'role down', + output: 'mocked output for role down', pass: true, }, ], diff --git a/src/host/tests/snapshots/agent.js.snap b/src/host/tests/snapshots/agent.js.snap index 11650c0cd43f4e242f16aa3df6085152e2571648..13881eb346d518057d1edac4bf6da37687310b45 100644 GIT binary patch literal 3462 zcmV;14SDiGRzV1|;j!2v;r(ccm2yeMwVoQ$JK)K4*ecuGBVs6|R| z;_x!$dagKESMcL{;pEAa)2eesLGVFVh>U8JPW54^JO=qPtJ*wLbz-_2lSJ_s zP`pL0GRktQcP@ynIMbp1rpQA|?#nIP(=E8e@99|OEX?%DZe&oxtaensPnM6ROf$!#d+LC65)OAe-yBwc%+ zg~~a|HCENdsyg2-3BpXs0?5ZCM%}Gzekpxd`y>;0HGV{^GkSXxa_);epx*r2cu%hR zMyR@TjjWxkwsooUCZ@~VkUcH0_RpKFeO^}>s=Zru{2Z6~CEJ=#w(%X;q4Hl=twq=9 zVyO!^rPSu->$wLb(WrVeax@T>qeE>Ec@;UOq`dy^JKDWjpW^jD%QdL{9WsvNSTrMCQ%P^J$4p_yyamkg8I<}p$g7Ym?0xACe4=XD zkcAur*T#I%j325Mi-m<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t!4fc8`JZTx(d_KW5Hz%k%`e!gm&Ul8sB zB0$V+zUqq&ov(V;%Is_VtM-faJ2ko4^Sst9T%warEgAD#>mjlU*v-#t9e~JT;0!;n zbsi!Y$0Ve4Y3@@pa&4C`j=zNby8IrxkKOMq@(6p;@NHtSKuz8g`*=|U8ty+9j>mw;>hG~9gXV-fHvRxd_>@*+fD z0nW0bfeL$UvXyj|oi~&(uyO%srQw9WBsaW~v?%Bp@Fpudj;p;Y zoamzLj8k1RoL}uN@P>bFEkl$RJGH&UXuM)HF$b!lHo>}KH=e7Jm<}-=Vmichi0M>i zI^AyCVPZXAv7WdSHBp0AospkfX_Gh*aUkMA#DRzdRpmfVGVRpPS8FQtZ715Ip1zxv zQ#IVSxIxa8h9qa-hsY0s-~muwQafDU3XK%#&{W%`X+FJPxk%{k-us8z_uYeB75yk c&dAk diff --git a/src/host/tests/snapshots/cli-run-plan.js.md b/src/host/tests/snapshots/cli-run-plan.js.md index 0f11a8e..d81f31a 100644 --- a/src/host/tests/snapshots/cli-run-plan.js.md +++ b/src/host/tests/snapshots/cli-run-plan.js.md @@ -28,7 +28,7 @@ Generated by [AVA](https://avajs.dev). Stopping reference server.␊ Stopping...␊ `, - stdout: `{"name":"unknown","tests":[{"filepath":"test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/index.html'."}],"results":[{"testId":1,"results":[{"command":"UP_ARROW","expectation":"role up","pass":true}]}]},{"filepath":"test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/index.html'."}],"results":[{"testId":2,"results":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","pass":true}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/index.html'."}]}␊ + stdout: `{"name":"unknown","tests":[{"filepath":"test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/index.html'."}],"results":[{"testId":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW","expectation":"role up","output":"mocked output for role up","pass":true}]}]},{"filepath":"test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/index.html'."}],"results":[{"testId":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","output":"mocked output for role down","pass":true}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/index.html'."}]}␊ `, } @@ -56,7 +56,7 @@ Generated by [AVA](https://avajs.dev). Stopping reference server.␊ Stopping...␊ `, - stdout: `{"name":"unknown","tests":[{"filepath":"test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":1,"results":[{"command":"UP_ARROW","expectation":"role up","pass":true}]}]},{"filepath":"test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":2,"results":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","pass":true}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}]}␊ + stdout: `{"name":"unknown","tests":[{"filepath":"test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW","expectation":"role up","output":"mocked output for role up","pass":true}]}]},{"filepath":"test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","output":"mocked output for role down","pass":true}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}]}␊ `, } @@ -84,6 +84,44 @@ Generated by [AVA](https://avajs.dev). Stopping reference server.␊ Stopping...␊ `, - stdout: `{"name":"unknown","tests":[{"filepath":"tests/test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":1,"results":[{"command":"UP_ARROW","expectation":"role up","pass":true}]}]},{"filepath":"tests/test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":2,"results":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","pass":true}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}]}␊ + stdout: `{"name":"unknown","tests":[{"filepath":"tests/test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW","expectation":"role up","output":"mocked output for role up","pass":true}]}]},{"filepath":"tests/test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","output":"mocked output for role down","pass":true}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}]}␊ + `, + } + +## plan3 with callback + +> Snapshot 1 + + { + stderr: `Starting...␊ + Reference server listening on 'http://localhost:8888'.␊ + Plan 'unknown' with 2 tests and 4 files read from source 'fork'.␊ + Reference available on 'http://localhost:8888/static␊ + Starting test agent.␊ + [Agent]: Starting...␊ + Agent running with protocol 'fork'.␊ + Starting test.␊ + [Server]: Serving '/static/reference/index.html'.␊ + [Agent]: Open page: 'http://localhost:8888/static/reference/index.html'.␊ + Starting test.␊ + [Server]: Serving '/static/reference/index.html'.␊ + [Agent]: Open page: 'http://localhost:8888/static/reference/index.html'.␊ + Removing reference from 'http://localhost:8888/static␊ + Stopping test agent.␊ + [Agent]: Stopping...␊ + Stopping reference server.␊ + Stopping...␊ + `, + stdout: `Callback Fetch Mocked: http://callback.url/ {␊ + method: 'post',␊ + body: '{"testId":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for role up"]}',␊ + headers: { 'Content-Type': 'application/json', test: 'header:multiple:colon' }␊ + }␊ + Callback Fetch Mocked: http://callback.url/ {␊ + method: 'post',␊ + body: '{"testId":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"responses":["mocked output for role down"]}',␊ + headers: { 'Content-Type': 'application/json', test: 'header:multiple:colon' }␊ + }␊ + {"name":"unknown","tests":[{"filepath":"tests/test-1.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":1,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW","expectation":"role up","output":"mocked output for role up","pass":true}]}]},{"filepath":"tests/test-2.json","log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}],"results":[{"testId":2,"capabilities":{"browserName":"mock","browserVersion":"1.0","atName":"mock","atVersion":"1.0","platformName":"mock"},"commands":[{"command":"UP_ARROW,DOWN_ARROW","expectation":"role down","output":"mocked output for role down","pass":true}]}]}],"log":[{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."},{"data":{"type":"openPage","date":"2000-01-01T12:00:00.000Z","url":{}},"text":"Open page: 'http://localhost:8888/static/reference/index.html'."}]}␊ `, } diff --git a/src/host/tests/snapshots/cli-run-plan.js.snap b/src/host/tests/snapshots/cli-run-plan.js.snap index d04655938bd1700de74a7b338f19ea204cd48691..3843e19fd1339c4ff7fc0e04cf40d6e442473df7 100644 GIT binary patch literal 983 zcmV;|11S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