diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 1a34ca4..76f363f 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -41,6 +41,9 @@ jobs: SMOKE_GITCODE_OWNER: ${{ secrets.SMOKE_GITCODE_OWNER }} SMOKE_GITCODE_REPO: ${{ secrets.SMOKE_GITCODE_REPO }} SMOKE_GITCODE_ISSUE_NUMBER: ${{ secrets.SMOKE_GITCODE_ISSUE_NUMBER }} + SMOKE_GITHUB_TOKEN: ${{ secrets.SMOKE_GITHUB_TOKEN }} + SMOKE_GITHUB_OWNER: ${{ secrets.SMOKE_GITHUB_OWNER }} + SMOKE_GITHUB_REPO: ${{ secrets.SMOKE_GITHUB_REPO }} SMOKE_FORUM_URL: ${{ secrets.SMOKE_FORUM_URL }} SMOKE_FORUM_API_KEY: ${{ secrets.SMOKE_FORUM_API_KEY }} SMOKE_FORUM_USERNAME: ${{ secrets.SMOKE_FORUM_USERNAME }} diff --git a/scenarios/forum/topics-get.yaml b/scenarios/forum/topics-get.yaml new file mode 100644 index 0000000..e49e5a0 --- /dev/null +++ b/scenarios/forum/topics-get.yaml @@ -0,0 +1,18 @@ +name: "forum/topics-get" +skip: true +skip_reason: "Forum instance may be unstable — enable when ready" +service: forum +args: + - topics + - get + - --id + - 1 +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["title", "id", "created_at"] + - type: json_key_not_empty + key: "title" diff --git a/scenarios/forum/topics-list.yaml b/scenarios/forum/topics-list.yaml new file mode 100644 index 0000000..8417f1a --- /dev/null +++ b/scenarios/forum/topics-list.yaml @@ -0,0 +1,17 @@ +name: "forum/topics-list" +skip: true +skip_reason: "Forum instance may be unstable — enable when ready" +service: forum +args: + - topics + - list +format: table +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: response_time_lt + value: 8000 + - type: stdout_not_empty + - type: stderr_not_contains + value: "ERROR" diff --git a/scenarios/gitcode/issues-comments.yaml b/scenarios/gitcode/issues-comments.yaml new file mode 100644 index 0000000..a1cf391 --- /dev/null +++ b/scenarios/gitcode/issues-comments.yaml @@ -0,0 +1,19 @@ +name: "gitcode/issues-comments" +service: gitcode +args: + - issues + - comments + - --owner + - openeuler + - --repo + - infrastructure + - --number + - 404 +format: table +timeout_ms: 8000 +assertions: + - type: exit_code + value: 0 + - type: stdout_not_empty + - type: stderr_not_contains + value: "ERROR" diff --git a/scenarios/gitcode/pulls-get.yaml b/scenarios/gitcode/pulls-get.yaml new file mode 100644 index 0000000..8bc0633 --- /dev/null +++ b/scenarios/gitcode/pulls-get.yaml @@ -0,0 +1,20 @@ +name: "gitcode/pulls-get" +service: gitcode +args: + - pulls + - get + - --owner + - openeuler + - --repo + - infrastructure + - --number + - 480 +format: json +timeout_ms: 8000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["title", "state", "number", "user", "created_at"] + - type: json_key_not_empty + key: "title" diff --git a/scenarios/gitcode/repos-get.yaml b/scenarios/gitcode/repos-get.yaml new file mode 100644 index 0000000..ea5ccc5 --- /dev/null +++ b/scenarios/gitcode/repos-get.yaml @@ -0,0 +1,18 @@ +name: "gitcode/repos-get" +service: gitcode +args: + - repos + - get + - --owner + - openeuler + - --repo + - infrastructure +format: json +timeout_ms: 8000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["full_name", "description", "default_branch"] + - type: json_key_not_empty + key: "full_name" diff --git a/scenarios/gitcode/users-get.yaml b/scenarios/gitcode/users-get.yaml new file mode 100644 index 0000000..bf38fbd --- /dev/null +++ b/scenarios/gitcode/users-get.yaml @@ -0,0 +1,16 @@ +name: "gitcode/users-get" +service: gitcode +args: + - users + - get + - --username + - TommyLike +format: json +timeout_ms: 8000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["login", "name", "id"] + - type: json_key_not_empty + key: "login" diff --git a/scenarios/gitcode/users-list-user.yaml b/scenarios/gitcode/users-list-user.yaml new file mode 100644 index 0000000..6b4c3a5 --- /dev/null +++ b/scenarios/gitcode/users-list-user.yaml @@ -0,0 +1,14 @@ +name: "gitcode/users-list-user" +service: gitcode +args: + - users + - list-user +format: json +timeout_ms: 8000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["login", "name", "id", "email"] + - type: json_key_not_empty + key: "login" diff --git a/scenarios/github/pulls-get.yaml b/scenarios/github/pulls-get.yaml new file mode 100644 index 0000000..998f110 --- /dev/null +++ b/scenarios/github/pulls-get.yaml @@ -0,0 +1,20 @@ +name: "github/pulls-get" +service: github +args: + - pulls + - get + - --owner + - opensourceways + - --repo + - cora + - --pull-number + - 3 +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["title", "state", "number", "user", "created_at"] + - type: json_key_not_empty + key: "title" diff --git a/scenarios/github/pulls-list.yaml b/scenarios/github/pulls-list.yaml new file mode 100644 index 0000000..fe194bf --- /dev/null +++ b/scenarios/github/pulls-list.yaml @@ -0,0 +1,19 @@ +name: "github/pulls-list" +service: github +args: + - pulls + - list + - --owner + - opensourceways + - --repo + - cora + - --state + - open +format: table +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: stdout_not_empty + - type: stderr_not_contains + value: "ERROR" diff --git a/scenarios/github/users-get.yaml b/scenarios/github/users-get.yaml new file mode 100644 index 0000000..8c6b2d9 --- /dev/null +++ b/scenarios/github/users-get.yaml @@ -0,0 +1,16 @@ +name: "github/users-get" +service: github +args: + - users + - get + - --username + - TommyLike +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["login", "name", "id", "html_url"] + - type: json_key_not_empty + key: "login" diff --git a/scenarios/github/users-list-user.yaml b/scenarios/github/users-list-user.yaml new file mode 100644 index 0000000..dae4ada --- /dev/null +++ b/scenarios/github/users-list-user.yaml @@ -0,0 +1,14 @@ +name: "github/users-list-user" +service: github +args: + - users + - list-user +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["login", "name", "id"] + - type: json_key_not_empty + key: "login" diff --git a/scenarios/jenkins/builds-get.yaml b/scenarios/jenkins/builds-get.yaml new file mode 100644 index 0000000..cdee793 --- /dev/null +++ b/scenarios/jenkins/builds-get.yaml @@ -0,0 +1,20 @@ +name: "jenkins/builds-get" +service: jenkins +args: + - builds + - get + - --name + - "multiarch/job/src-openeuler/job/x86-64/job/llvm-toolset-20" + - --number + - 38 +format: json +timeout_ms: 10000 +skip: true +skip_reason: "Requires configured Jenkins instance with build history" +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["number", "result", "building"] + - type: json_key_not_empty + key: "result" diff --git a/scenarios/jenkins/queue-list.yaml b/scenarios/jenkins/queue-list.yaml new file mode 100644 index 0000000..1b9a120 --- /dev/null +++ b/scenarios/jenkins/queue-list.yaml @@ -0,0 +1,15 @@ +name: "jenkins/queue-list" +service: jenkins +args: + - queue + - list +format: table +timeout_ms: 10000 +skip: true +skip_reason: "Requires configured Jenkins instance" +assertions: + - type: exit_code + value: 0 + - type: stdout_not_empty + - type: stderr_not_contains + value: "ERROR"