tests: remove runTestJobFile (#1127)

This prevented JetBrains GoLand from recognising subtests and treated
it all as single big test, VSCode seems to be still broken in that regard

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Ryan 2022-04-19 21:35:42 +02:00 committed by GitHub
parent 9021bc2fa8
commit 40492fea32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -25,7 +25,9 @@ func TestJobExecutor(t *testing.T) {
// These tests are sufficient to only check syntax.
ctx := common.WithDryrun(context.Background(), true)
for _, table := range tables {
runTestJobFile(ctx, t, table)
t.Run(table.workflowPath, func(t *testing.T) {
table.runTest(ctx, t, &Config{})
})
}
}

View File

@ -105,12 +105,6 @@ func (j *TestJobFileInfo) runTest(ctx context.Context, t *testing.T, cfg *Config
}
}
func runTestJobFile(ctx context.Context, t *testing.T, j TestJobFileInfo) {
t.Run(j.workflowPath, func(t *testing.T) {
j.runTest(ctx, t, &Config{})
})
}
func TestRunEvent(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
@ -179,7 +173,9 @@ func TestRunEvent(t *testing.T) {
}
for _, table := range tables {
runTestJobFile(ctx, t, table)
t.Run(table.workflowPath, func(t *testing.T) {
table.runTest(ctx, t, &Config{})
})
}
}