Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,855 changes: 1,256 additions & 6,599 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/schema/input.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/schema/input.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/schema/input.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@octokit/types": "16.0.0",
"date-fns": "4.1.0",
"issue-metadata": "0.2.4",
"testing-farm": "1.10.2",
"testing-farm": "1.11.0",
"zod": "4.1.12"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/schema/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const tmtArtifactsSchema = z

// https://api.testing-farm.io/redoc#operation/request_a_new_test_v0_1_requests_post
// https://tmt.readthedocs.io/en/stable/spec/context.html#dimension
export const tmtContextSchema = z.object({
export const tmtContextSchema = z.looseObject({
distro: z.string().min(1).optional(),
variant: z.string().min(1).optional(),
arch: z.string().min(1).optional(),
Expand Down
15 changes: 14 additions & 1 deletion tests/unit/input.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,20 @@ describe('tmt variables/secrets/context input', () => {
});

test('tmt-context input', () => {
let input = 'distro=fedora;arch=x86_64;trigger=push';
// test undocumented inputs
let input =
'COMPOSE_CONTROLLER=RHEL-9-Nightly;COMPOSE_MANAGED_NODE=RHEL-9.6.0-Nightly;initiator=testing-farm';

expect(tmtContextSchema.parse(tmtContextInputSchema.parse(input)))
.toMatchInlineSnapshot(`
{
"COMPOSE_CONTROLLER": "RHEL-9-Nightly",
"COMPOSE_MANAGED_NODE": "RHEL-9.6.0-Nightly",
"initiator": "testing-farm",
}
`);

input = 'distro=fedora;arch=x86_64;trigger=push';

expect(tmtContextSchema.parse(tmtContextInputSchema.parse(input)))
.toMatchInlineSnapshot(`
Expand Down
29 changes: 11 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1137,14 +1137,14 @@ __metadata:
languageName: node
linkType: hard

"axios@npm:1.11.0":
version: 1.11.0
resolution: "axios@npm:1.11.0"
"axios@npm:1.13.2":
version: 1.13.2
resolution: "axios@npm:1.13.2"
dependencies:
follow-redirects: "npm:^1.15.6"
form-data: "npm:^4.0.4"
proxy-from-env: "npm:^1.1.0"
checksum: 10/232df4af7a4e4e07baa84621b9cc4b0c518a757b4eacc7f635c0eb3642cb98dff347326739f24b891b3b4481b7b838c79a3a0c4819c9fbc1fc40232431b9c5dc
checksum: 10/ae4e06dcd18289f2fd18179256d550d27f9a53ecb2f9c59f2ccc4efd1d7151839ba8c3e0fb533dac793e4a59a576ca8689a19244dce5c396680837674a47a867
languageName: node
linkType: hard

Expand Down Expand Up @@ -2574,21 +2574,21 @@ __metadata:
date-fns: "npm:4.1.0"
issue-metadata: "npm:0.2.4"
prettier: "npm:3.6.2"
testing-farm: "npm:1.10.2"
testing-farm: "npm:1.11.0"
ts-node: "npm:10.9.2"
typescript: "npm:5.9.3"
vitest: "npm:3.2.4"
zod: "npm:4.1.12"
languageName: unknown
linkType: soft

"testing-farm@npm:1.10.2":
version: 1.10.2
resolution: "testing-farm@npm:1.10.2"
"testing-farm@npm:1.11.0":
version: 1.11.0
resolution: "testing-farm@npm:1.11.0"
dependencies:
axios: "npm:1.11.0"
zod: "npm:4.1.1"
checksum: 10/8cce016b662324072b8088d332e22bd46df675f9d26629c4d9cef193e54ce972c733a07bde3c1da952a7dafc5cef233ba2e9e56a62ad3e2af70ee4413ca2f96d
axios: "npm:1.13.2"
zod: "npm:4.1.12"
checksum: 10/2f91a5e3428ff71400aa009deff405479fc1b1cc8dd42fa5be1f8d7176e03c226f01457521efd183132367cf2f7004e4b069ceef661833c47df12ab5c2ba94e8
languageName: node
linkType: hard

Expand Down Expand Up @@ -2977,13 +2977,6 @@ __metadata:
languageName: node
linkType: hard

"zod@npm:4.1.1":
version: 4.1.1
resolution: "zod@npm:4.1.1"
checksum: 10/63e17d2f8d4e7a49331a62c2ad5b71705330139ddd677f2a055073b6a521a312e5dd2edc3e00953c90575075af098493c5c7b85429de0a952b8d6ab8c7e1b7e3
languageName: node
linkType: hard

"zod@npm:4.1.12":
version: 4.1.12
resolution: "zod@npm:4.1.12"
Expand Down
Loading