mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-09 00:30:28 +00:00
test(e2e): cover host mode, reusable workflows, scheduling, reconnect and CLI flags (#1347)
Extends the e2e suite with scenarios for host labels, local `workflow_call`, label routing, `runner.capacity`, a dropped and restored connection to Gitea, and the daemon's `--once`, `--labels` and `shutdown_timeout` behaviour. Stacked on https://gitea.com/gitea/runner/pulls/1346, so its commit shows here until that merges. The new scenarios pass locally against gitea/gitea:latest and main-nightly. Assisted-by: Codet:codet Co-authored-by: Zettat123 <[email protected]> Co-authored-by: bircni <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/1347 Reviewed-by: Zettat123 <[email protected]>
This commit is contained in:
1 parent
d77e216674
commit
b712c91c2d
21 files changed
+661
-65
No files matched your search
+2
-16
@@ -5,10 +5,7 @@
|
||||
|
||||
package e2e
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
import "testing"
|
||||
|
||||
func testFailurePaths(t *testing.T) {
|
||||
t.Parallel()
|
||||
@@ -47,18 +44,7 @@ func testFailurePaths(t *testing.T) {
|
||||
t.Errorf("job %q not found", name)
|
||||
}
|
||||
|
||||
var all strings.Builder
|
||||
for _, job := range jobs {
|
||||
if job.Conclusion == "skipped" { // a skipped job never started, so it has no log
|
||||
continue
|
||||
}
|
||||
jobLogs, err := api.JobLogs(ctx, repo, job.ID)
|
||||
if err != nil {
|
||||
t.Fatalf("job logs for %s: %v", job.Name, err)
|
||||
}
|
||||
all.WriteString(jobLogs)
|
||||
}
|
||||
logs := all.String()
|
||||
logs := runLogs(t, api, repo, wfRun.ID)
|
||||
for _, marker := range []string{"e2e-before-fail", "e2e-failure-cleanup", "e2e-tolerated-next", "e2e-timeout-started"} {
|
||||
if commandRow(logs, marker) != marker {
|
||||
t.Errorf("logs are missing %q", marker)
|
||||
|
||||
Reference in new issue
Block a user