mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
chore(tests): fix invalid jobparser tests
- has_with had undetected structure error now failing the schema - empty_step and has_secrets are invalid and caught by the schema there no longer is a need for them
This commit is contained in:
parent
e069333f58
commit
cbdb42093b
7 changed files with 20 additions and 55 deletions
|
@ -42,16 +42,6 @@ func TestParse(t *testing.T) {
|
|||
options: nil,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "has_secrets",
|
||||
options: nil,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "empty_step",
|
||||
options: nil,
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
|
8
act/jobparser/testdata/empty_step.in.yaml
vendored
8
act/jobparser/testdata/empty_step.in.yaml
vendored
|
@ -1,8 +0,0 @@
|
|||
name: test
|
||||
jobs:
|
||||
job1:
|
||||
name: job1
|
||||
runs-on: linux
|
||||
steps:
|
||||
- run: echo job-1
|
||||
-
|
7
act/jobparser/testdata/empty_step.out.yaml
vendored
7
act/jobparser/testdata/empty_step.out.yaml
vendored
|
@ -1,7 +0,0 @@
|
|||
name: test
|
||||
jobs:
|
||||
job1:
|
||||
name: job1
|
||||
runs-on: linux
|
||||
steps:
|
||||
- run: echo job-1
|
6
act/jobparser/testdata/has_secrets.in.yaml
vendored
6
act/jobparser/testdata/has_secrets.in.yaml
vendored
|
@ -3,12 +3,14 @@ jobs:
|
|||
job1:
|
||||
name: job1
|
||||
runs-on: linux
|
||||
uses: .gitea/workflows/build.yml
|
||||
secrets:
|
||||
secret: hideme
|
||||
steps:
|
||||
- uses: .gitea/workflows/build.yml
|
||||
|
||||
job2:
|
||||
name: job2
|
||||
runs-on: linux
|
||||
uses: .gitea/workflows/build.yml
|
||||
secrets: inherit
|
||||
steps:
|
||||
- uses: .gitea/workflows/build.yml
|
||||
|
|
16
act/jobparser/testdata/has_secrets.out.yaml
vendored
16
act/jobparser/testdata/has_secrets.out.yaml
vendored
|
@ -1,16 +0,0 @@
|
|||
name: test
|
||||
jobs:
|
||||
job1:
|
||||
name: job1
|
||||
runs-on: linux
|
||||
uses: .gitea/workflows/build.yml
|
||||
secrets:
|
||||
secret: hideme
|
||||
---
|
||||
name: test
|
||||
jobs:
|
||||
job2:
|
||||
name: job2
|
||||
runs-on: linux
|
||||
uses: .gitea/workflows/build.yml
|
||||
secrets: inherit
|
14
act/jobparser/testdata/has_with.in.yaml
vendored
14
act/jobparser/testdata/has_with.in.yaml
vendored
|
@ -3,13 +3,15 @@ jobs:
|
|||
job1:
|
||||
name: job1
|
||||
runs-on: linux
|
||||
uses: .gitea/workflows/build.yml
|
||||
with:
|
||||
package: service
|
||||
steps:
|
||||
- uses: .gitea/workflows/build.yml
|
||||
with:
|
||||
package: service
|
||||
|
||||
job2:
|
||||
name: job2
|
||||
runs-on: linux
|
||||
uses: .gitea/workflows/build.yml
|
||||
with:
|
||||
package: module
|
||||
steps:
|
||||
- uses: .gitea/workflows/build.yml
|
||||
with:
|
||||
package: module
|
||||
|
|
14
act/jobparser/testdata/has_with.out.yaml
vendored
14
act/jobparser/testdata/has_with.out.yaml
vendored
|
@ -3,15 +3,17 @@ jobs:
|
|||
job1:
|
||||
name: job1
|
||||
runs-on: linux
|
||||
uses: .gitea/workflows/build.yml
|
||||
with:
|
||||
package: service
|
||||
steps:
|
||||
- uses: .gitea/workflows/build.yml
|
||||
with:
|
||||
package: service
|
||||
---
|
||||
name: test
|
||||
jobs:
|
||||
job2:
|
||||
name: job2
|
||||
runs-on: linux
|
||||
uses: .gitea/workflows/build.yml
|
||||
with:
|
||||
package: module
|
||||
steps:
|
||||
- uses: .gitea/workflows/build.yml
|
||||
with:
|
||||
package: module
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue