diff --git a/internal/view/builtin.go b/internal/view/builtin.go index 3cbec3d..3a2eb3e 100644 --- a/internal/view/builtin.go +++ b/internal/view/builtin.go @@ -223,7 +223,9 @@ var builtinViews = map[string]map[string]ViewConfig{ }, "forum": { + // ── Topics ────────────────────────────────────────────────────────── "topics/list": { + RootField: "topic_list.topics", Columns: []ViewColumn{ {Field: "id", Label: "ID", Width: 8}, {Field: "title", Label: "Title", Truncate: 60, Width: 62}, @@ -242,6 +244,35 @@ var builtinViews = map[string]map[string]ViewConfig{ {Field: "category_id", Label: "Category"}, }, }, + "topics/list-top": { + RootField: "topic_list.topics", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "title", Label: "Title", Truncate: 60, Width: 62}, + {Field: "posts_count", Label: "Posts", Width: 8}, + {Field: "reply_count", Label: "Replies", Width: 8}, + {Field: "created_at", Label: "Created", Format: FormatDate, Width: 12}, + }, + }, + "topics/get-post": { + RootField: "post_stream.posts", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "username", Label: "Author", Width: 18}, + {Field: "cooked", Label: "Content", Format: FormatMultiline, Truncate: 200, Width: 60}, + {Field: "created_at", Label: "Created", Format: FormatDate, Width: 12}, + }, + }, + "topics/get-external-id": { + Columns: []ViewColumn{ + {Field: "id", Label: "ID"}, + {Field: "title", Label: "Title"}, + {Field: "posts_count", Label: "Posts"}, + {Field: "created_at", Label: "Created", Format: FormatDate}, + }, + }, + + // ── Posts ─────────────────────────────────────────────────────────── "posts/list": { Columns: []ViewColumn{ {Field: "id", Label: "ID", Width: 8}, @@ -250,6 +281,253 @@ var builtinViews = map[string]map[string]ViewConfig{ {Field: "created_at", Label: "Created", Format: FormatDate, Width: 12}, }, }, + "posts/get": { + Columns: []ViewColumn{ + {Field: "id", Label: "ID"}, + {Field: "username", Label: "Author", Width: 18}, + {Field: "cooked", Label: "Content", Format: FormatMultiline, Truncate: 300}, + {Field: "post_number", Label: "No."}, + {Field: "reply_count", Label: "Replies"}, + {Field: "created_at", Label: "Created", Format: FormatDate}, + {Field: "updated_at", Label: "Updated", Format: FormatDate}, + }, + }, + "posts/replies": { + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "username", Label: "Author", Width: 18}, + {Field: "cooked", Label: "Content", Format: FormatMultiline, Truncate: 160, Width: 56}, + {Field: "post_number", Label: "No.", Width: 6}, + {Field: "created_at", Label: "Created", Format: FormatDate, Width: 12}, + }, + }, + + // ── Categories ────────────────────────────────────────────────────── + "categories/get": { + Columns: []ViewColumn{ + {Field: "category.id", Label: "ID"}, + {Field: "category.name", Label: "Name"}, + {Field: "category.slug", Label: "Slug"}, + {Field: "category.topic_count", Label: "Topics"}, + {Field: "category.post_count", Label: "Posts"}, + {Field: "category.color", Label: "Color"}, + }, + }, + "categories/list": { + RootField: "topic_list.topics", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "title", Label: "Title", Truncate: 60, Width: 62}, + {Field: "posts_count", Label: "Posts", Width: 8}, + {Field: "reply_count", Label: "Replies", Width: 8}, + {Field: "created_at", Label: "Created", Format: FormatDate, Width: 12}, + }, + }, + "categories/list-categorie": { + RootField: "category_list.categories", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "name", Label: "Name", Width: 28}, + {Field: "slug", Label: "Slug", Width: 28}, + {Field: "topic_count", Label: "Topics", Width: 8}, + {Field: "post_count", Label: "Posts", Width: 8}, + }, + }, + + // ── Groups ────────────────────────────────────────────────────────── + "groups/get": { + Columns: []ViewColumn{ + {Field: "group.id", Label: "ID"}, + {Field: "group.name", Label: "Name"}, + {Field: "group.display_name", Label: "Display"}, + {Field: "group.user_count", Label: "Members"}, + {Field: "group.automatic", Label: "Auto"}, + {Field: "group.primary_group", Label: "Primary"}, + }, + }, + "groups/get-group": { + Columns: []ViewColumn{ + {Field: "group.id", Label: "ID"}, + {Field: "group.name", Label: "Name"}, + {Field: "group.display_name", Label: "Display"}, + {Field: "group.user_count", Label: "Members"}, + {Field: "group.automatic", Label: "Auto"}, + {Field: "group.primary_group", Label: "Primary"}, + }, + }, + "groups/list": { + RootField: "groups", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "name", Label: "Name", Width: 28}, + {Field: "display_name", Label: "Display", Truncate: 24, Width: 24}, + {Field: "user_count", Label: "Members", Width: 8}, + {Field: "automatic", Label: "Auto", Width: 6}, + {Field: "primary_group", Label: "Primary", Width: 8}, + }, + }, + "groups/list-group": { + RootField: "members", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "username", Label: "Username", Width: 20}, + {Field: "name", Label: "Name", Width: 20}, + {Field: "title", Label: "Title", Width: 18}, + {Field: "last_seen_at", Label: "Last Seen", Format: FormatDate, Width: 12}, + {Field: "added_at", Label: "Added", Format: FormatDate, Width: 12}, + }, + }, + + // ── Badges ────────────────────────────────────────────────────────── + "badges/list": { + RootField: "badges", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "name", Label: "Name", Width: 28}, + {Field: "description", Label: "Description", Truncate: 40, Width: 42}, + {Field: "grant_count", Label: "Grants", Width: 8}, + {Field: "enabled", Label: "Enabled", Width: 8}, + }, + }, + "badges/list-user-badge": { + RootField: "badges", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "name", Label: "Name", Width: 28}, + {Field: "description", Label: "Description", Truncate: 40, Width: 42}, + {Field: "grant_count", Label: "Grants", Width: 8}, + }, + }, + + // ── Tags ──────────────────────────────────────────────────────────── + "tags/get": { + RootField: "topic_list.topics", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "title", Label: "Title", Truncate: 60, Width: 62}, + {Field: "posts_count", Label: "Posts", Width: 8}, + {Field: "created_at", Label: "Created", Format: FormatDate, Width: 12}, + }, + }, + "tags/get-tag-group": { + Columns: []ViewColumn{ + {Field: "tag_group.id", Label: "ID"}, + {Field: "tag_group.name", Label: "Name"}, + {Field: "tag_group.one_per_topic", Label: "One Per Topic"}, + }, + }, + "tags/list": { + RootField: "tags", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "name", Label: "Name", Width: 28}, + {Field: "text", Label: "Text", Width: 28}, + {Field: "count", Label: "Topics", Width: 8}, + {Field: "pm_count", Label: "PMs", Width: 8}, + }, + }, + "tags/list-tag-group": { + RootField: "tag_groups", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "name", Label: "Name", Width: 28}, + {Field: "parent_tag", Label: "Parent Tag", Width: 20}, + {Field: "one_per_topic", Label: "One Per Topic", Width: 12}, + }, + }, + + // ── Users ─────────────────────────────────────────────────────────── + "users/get": { + Columns: []ViewColumn{ + {Field: "user.id", Label: "ID"}, + {Field: "user.username", Label: "Username"}, + {Field: "user.name", Label: "Name"}, + {Field: "user.created_at", Label: "Joined", Format: FormatDate}, + {Field: "user.trust_level", Label: "Trust"}, + {Field: "user.admin", Label: "Admin"}, + {Field: "user.moderator", Label: "Mod"}, + }, + }, + "users/get-admin": { + Columns: []ViewColumn{ + {Field: "id", Label: "ID"}, + {Field: "username", Label: "Username"}, + {Field: "name", Label: "Name"}, + {Field: "active", Label: "Active"}, + {Field: "admin", Label: "Admin"}, + {Field: "moderator", Label: "Mod"}, + {Field: "trust_level", Label: "Trust"}, + {Field: "created_at", Label: "Joined", Format: FormatDate}, + {Field: "last_seen_at", Label: "Last Seen", Format: FormatDate}, + }, + }, + "users/get-admin-list": { + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "username", Label: "Username", Width: 20}, + {Field: "name", Label: "Name", Width: 20}, + {Field: "active", Label: "Active", Width: 7}, + {Field: "admin", Label: "Admin", Width: 6}, + {Field: "created_at", Label: "Joined", Format: FormatDate, Width: 12}, + }, + }, + "users/get-by-external": { + Columns: []ViewColumn{ + {Field: "user.id", Label: "ID"}, + {Field: "user.username", Label: "Username"}, + {Field: "user.name", Label: "Name"}, + {Field: "user.created_at", Label: "Joined", Format: FormatDate}, + {Field: "user.trust_level", Label: "Trust"}, + }, + }, + "users/get-by-external-by-external": { + Columns: []ViewColumn{ + {Field: "user.id", Label: "ID"}, + {Field: "user.username", Label: "Username"}, + {Field: "user.name", Label: "Name"}, + {Field: "user.created_at", Label: "Joined", Format: FormatDate}, + {Field: "user.trust_level", Label: "Trust"}, + }, + }, + "users/get-email": { + Columns: []ViewColumn{ + {Field: "email", Label: "Email"}, + {Field: "secondary_emails", Label: "Secondary", Format: FormatJSON}, + {Field: "unconfirmed_emails", Label: "Unconfirmed", Format: FormatJSON}, + }, + }, + "users/list": { + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "username", Label: "Username", Width: 20}, + {Field: "name", Label: "Name", Width: 20}, + {Field: "active", Label: "Active", Width: 7}, + {Field: "admin", Label: "Admin", Width: 6}, + {Field: "created_at", Label: "Joined", Format: FormatDate, Width: 12}, + }, + }, + "users/list-directory-item": { + RootField: "directory_items", + Columns: []ViewColumn{ + {Field: "id", Label: "ID", Width: 8}, + {Field: "user.username", Label: "Username", Width: 20}, + {Field: "likes_received", Label: "Likes Rcvd", Width: 10}, + {Field: "likes_given", Label: "Likes Given", Width: 10}, + {Field: "topic_count", Label: "Topics", Width: 8}, + {Field: "post_count", Label: "Posts", Width: 8}, + {Field: "days_visited", Label: "Days", Width: 8}, + }, + }, + "users/list-user-action": { + RootField: "user_actions", + Columns: []ViewColumn{ + {Field: "action_type", Label: "Action", Width: 10}, + {Field: "username", Label: "User", Width: 18}, + {Field: "excerpt", Label: "Excerpt", Format: FormatMultiline, Truncate: 120, Width: 50}, + {Field: "target_name", Label: "Target", Width: 18}, + {Field: "created_at", Label: "When", Format: FormatDate, Width: 12}, + }, + }, }, "etherpad": { diff --git a/internal/view/extract.go b/internal/view/extract.go index 1528d27..9e1667b 100644 --- a/internal/view/extract.go +++ b/internal/view/extract.go @@ -110,10 +110,11 @@ func DetectItems(raw []byte, cfg *ViewConfig) ([]map[string]interface{}, map[str return nil, nil } - // Apply explicit root_field. + // Apply explicit root_field. Supports dot-separated nested paths + // (e.g. "topic_list.topics"). if cfg != nil && cfg.RootField != "" { if obj, ok := v.(map[string]interface{}); ok { - v = obj[cfg.RootField] + v = ExtractField(obj, cfg.RootField) } } diff --git a/scenarios/forum/badges-list-user-badge.yaml b/scenarios/forum/badges-list-user-badge.yaml new file mode 100644 index 0000000..d640214 --- /dev/null +++ b/scenarios/forum/badges-list-user-badge.yaml @@ -0,0 +1,19 @@ +name: "forum/badges-list-user-badge" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "badges" + - "list-user-badge" + - "--username" + - "system" +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/forum/badges-list.yaml b/scenarios/forum/badges-list.yaml new file mode 100644 index 0000000..a4685ac --- /dev/null +++ b/scenarios/forum/badges-list.yaml @@ -0,0 +1,17 @@ +name: "forum/badges-list" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "badges" + - "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/forum/categories-get.yaml b/scenarios/forum/categories-get.yaml new file mode 100644 index 0000000..aa5f0d1 --- /dev/null +++ b/scenarios/forum/categories-get.yaml @@ -0,0 +1,18 @@ +name: "forum/categories-get" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "categories" + - "get" + - "--id" + - "1" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["category"] + - type: json_key_not_empty + key: "category" diff --git a/scenarios/forum/categories-list-categorie.yaml b/scenarios/forum/categories-list-categorie.yaml new file mode 100644 index 0000000..9c319b8 --- /dev/null +++ b/scenarios/forum/categories-list-categorie.yaml @@ -0,0 +1,17 @@ +name: "forum/categories-list-categorie" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "categories" + - "list-categorie" +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/forum/categories-list.yaml b/scenarios/forum/categories-list.yaml new file mode 100644 index 0000000..331f36e --- /dev/null +++ b/scenarios/forum/categories-list.yaml @@ -0,0 +1,21 @@ +name: "forum/categories-list" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "categories" + - "list" + - "--slug" + - "general" + - "--id" + - "1" +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/forum/groups-get-group.yaml b/scenarios/forum/groups-get-group.yaml new file mode 100644 index 0000000..0a27955 --- /dev/null +++ b/scenarios/forum/groups-get-group.yaml @@ -0,0 +1,18 @@ +name: "forum/groups-get-group" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "groups" + - "get-group" + - "--id" + - "1" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["group"] + - type: json_key_not_empty + key: "group" diff --git a/scenarios/forum/groups-get.yaml b/scenarios/forum/groups-get.yaml new file mode 100644 index 0000000..c1dccef --- /dev/null +++ b/scenarios/forum/groups-get.yaml @@ -0,0 +1,18 @@ +name: "forum/groups-get" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "groups" + - "get" + - "--name" + - "staff" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["group"] + - type: json_key_not_empty + key: "group" diff --git a/scenarios/forum/groups-list-group.yaml b/scenarios/forum/groups-list-group.yaml new file mode 100644 index 0000000..b3c4c66 --- /dev/null +++ b/scenarios/forum/groups-list-group.yaml @@ -0,0 +1,19 @@ +name: "forum/groups-list-group" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "groups" + - "list-group" + - "--name" + - "staff" +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/forum/groups-list.yaml b/scenarios/forum/groups-list.yaml new file mode 100644 index 0000000..13249bd --- /dev/null +++ b/scenarios/forum/groups-list.yaml @@ -0,0 +1,17 @@ +name: "forum/groups-list" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "groups" + - "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/forum/posts-get.yaml b/scenarios/forum/posts-get.yaml new file mode 100644 index 0000000..02ca998 --- /dev/null +++ b/scenarios/forum/posts-get.yaml @@ -0,0 +1,18 @@ +name: "forum/posts-get" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "posts" + - "get" + - "--id" + - "1" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["id", "username", "cooked"] + - type: json_key_not_empty + key: "id" diff --git a/scenarios/forum/posts-list.yaml b/scenarios/forum/posts-list.yaml index 66c34d2..279081e 100644 --- a/scenarios/forum/posts-list.yaml +++ b/scenarios/forum/posts-list.yaml @@ -1,7 +1,6 @@ name: "forum/posts-list" service: forum skip: true -skip_reason: "Forum instance may be unstable — enable when ready" args: - posts - list diff --git a/scenarios/forum/posts-replies.yaml b/scenarios/forum/posts-replies.yaml new file mode 100644 index 0000000..744036e --- /dev/null +++ b/scenarios/forum/posts-replies.yaml @@ -0,0 +1,19 @@ +name: "forum/posts-replies" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "posts" + - "replies" + - "--id" + - "1" +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/forum/tags-get-tag-group.yaml b/scenarios/forum/tags-get-tag-group.yaml new file mode 100644 index 0000000..c32ef5d --- /dev/null +++ b/scenarios/forum/tags-get-tag-group.yaml @@ -0,0 +1,18 @@ +name: "forum/tags-get-tag-group" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "tags" + - "get-tag-group" + - "--id" + - "1" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["tag_group"] + - type: json_key_not_empty + key: "tag_group" diff --git a/scenarios/forum/tags-get.yaml b/scenarios/forum/tags-get.yaml new file mode 100644 index 0000000..48f7821 --- /dev/null +++ b/scenarios/forum/tags-get.yaml @@ -0,0 +1,18 @@ +name: "forum/tags-get" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "tags" + - "get" + - "--name" + - "qa-提问求助" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["topic_list"] + - type: json_key_not_empty + key: "topic_list" diff --git a/scenarios/forum/tags-list-tag-group.yaml b/scenarios/forum/tags-list-tag-group.yaml new file mode 100644 index 0000000..054263d --- /dev/null +++ b/scenarios/forum/tags-list-tag-group.yaml @@ -0,0 +1,17 @@ +name: "forum/tags-list-tag-group" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "tags" + - "list-tag-group" +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/forum/tags-list.yaml b/scenarios/forum/tags-list.yaml new file mode 100644 index 0000000..d160427 --- /dev/null +++ b/scenarios/forum/tags-list.yaml @@ -0,0 +1,17 @@ +name: "forum/tags-list" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "tags" + - "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/forum/topics-get-external-id.yaml b/scenarios/forum/topics-get-external-id.yaml new file mode 100644 index 0000000..e777fb0 --- /dev/null +++ b/scenarios/forum/topics-get-external-id.yaml @@ -0,0 +1,18 @@ +name: "forum/topics-get-external-id" +skip: true +skip_reason: "No known valid external_id on test instance — enable when test data is available" +service: forum +args: + - "topics" + - "get-external-id" + - "--external-id" + - "1" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["id", "title"] + - type: json_key_not_empty + key: "title" diff --git a/scenarios/forum/topics-get-post.yaml b/scenarios/forum/topics-get-post.yaml new file mode 100644 index 0000000..d9c4c5a --- /dev/null +++ b/scenarios/forum/topics-get-post.yaml @@ -0,0 +1,18 @@ +name: "forum/topics-get-post" +skip: true +skip_reason: "OpenAPI spec defines post_ids as body param but Discourse expects query param — GET with body causes 413" +service: forum +args: + - "topics" + - "get-post" + - "--id" + - "1" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["id", "post_stream"] + - type: json_key_not_empty + key: "id" diff --git a/scenarios/forum/topics-get.yaml b/scenarios/forum/topics-get.yaml index e49e5a0..479cd65 100644 --- a/scenarios/forum/topics-get.yaml +++ b/scenarios/forum/topics-get.yaml @@ -1,6 +1,6 @@ name: "forum/topics-get" skip: true -skip_reason: "Forum instance may be unstable — enable when ready" +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" service: forum args: - topics diff --git a/scenarios/forum/topics-list-top.yaml b/scenarios/forum/topics-list-top.yaml new file mode 100644 index 0000000..fc8088f --- /dev/null +++ b/scenarios/forum/topics-list-top.yaml @@ -0,0 +1,17 @@ +name: "forum/topics-list-top" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "topics" + - "list-top" +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/forum/topics-list.yaml b/scenarios/forum/topics-list.yaml index 8417f1a..924c4ae 100644 --- a/scenarios/forum/topics-list.yaml +++ b/scenarios/forum/topics-list.yaml @@ -1,6 +1,6 @@ name: "forum/topics-list" skip: true -skip_reason: "Forum instance may be unstable — enable when ready" +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" service: forum args: - topics diff --git a/scenarios/forum/users-get-admin-list.yaml b/scenarios/forum/users-get-admin-list.yaml new file mode 100644 index 0000000..e3d398a --- /dev/null +++ b/scenarios/forum/users-get-admin-list.yaml @@ -0,0 +1,19 @@ +name: "forum/users-get-admin-list" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "users" + - "get-admin-list" + - "--flag" + - "active" +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/forum/users-get-admin.yaml b/scenarios/forum/users-get-admin.yaml new file mode 100644 index 0000000..b892fd7 --- /dev/null +++ b/scenarios/forum/users-get-admin.yaml @@ -0,0 +1,18 @@ +name: "forum/users-get-admin" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "users" + - "get-admin" + - "--id" + - "1" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["id", "username"] + - type: json_key_not_empty + key: "username" diff --git a/scenarios/forum/users-get-by-external-by-external.yaml b/scenarios/forum/users-get-by-external-by-external.yaml new file mode 100644 index 0000000..7144bbc --- /dev/null +++ b/scenarios/forum/users-get-by-external-by-external.yaml @@ -0,0 +1,20 @@ +name: "forum/users-get-by-external-by-external" +skip: true +skip_reason: "No known valid external_id on test instance — enable when test data is available" +service: forum +args: + - "users" + - "get-by-external-by-external" + - "--provider" + - "google" + - "--external-id" + - "1" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["user"] + - type: json_key_not_empty + key: "user" diff --git a/scenarios/forum/users-get-by-external.yaml b/scenarios/forum/users-get-by-external.yaml new file mode 100644 index 0000000..da289f7 --- /dev/null +++ b/scenarios/forum/users-get-by-external.yaml @@ -0,0 +1,18 @@ +name: "forum/users-get-by-external" +skip: true +skip_reason: "No known valid external_id on test instance — enable when test data is available" +service: forum +args: + - "users" + - "get-by-external" + - "--external-id" + - "1" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["user"] + - type: json_key_not_empty + key: "user" diff --git a/scenarios/forum/users-get-email.yaml b/scenarios/forum/users-get-email.yaml new file mode 100644 index 0000000..6e1d8ae --- /dev/null +++ b/scenarios/forum/users-get-email.yaml @@ -0,0 +1,18 @@ +name: "forum/users-get-email" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "users" + - "get-email" + - "--username" + - "system" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["email"] + - type: json_key_not_empty + key: "email" diff --git a/scenarios/forum/users-get.yaml b/scenarios/forum/users-get.yaml new file mode 100644 index 0000000..eeebc08 --- /dev/null +++ b/scenarios/forum/users-get.yaml @@ -0,0 +1,18 @@ +name: "forum/users-get" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "users" + - "get" + - "--username" + - "system" +format: json +timeout_ms: 10000 +assertions: + - type: exit_code + value: 0 + - type: json_has_keys + values: ["user"] + - type: json_key_not_empty + key: "user" diff --git a/scenarios/forum/users-list-directory-item.yaml b/scenarios/forum/users-list-directory-item.yaml new file mode 100644 index 0000000..e94bb8d --- /dev/null +++ b/scenarios/forum/users-list-directory-item.yaml @@ -0,0 +1,21 @@ +name: "forum/users-list-directory-item" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "users" + - "list-directory-item" + - "--order" + - "activity" + - "--period" + - "weekly" +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/forum/users-list-user-action.yaml b/scenarios/forum/users-list-user-action.yaml new file mode 100644 index 0000000..5ebf5d1 --- /dev/null +++ b/scenarios/forum/users-list-user-action.yaml @@ -0,0 +1,23 @@ +name: "forum/users-list-user-action" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "users" + - "list-user-action" + - "--filter" + - "1" + - "--offset" + - "0" + - "--username" + - "system" +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/forum/users-list.yaml b/scenarios/forum/users-list.yaml new file mode 100644 index 0000000..dabf2a7 --- /dev/null +++ b/scenarios/forum/users-list.yaml @@ -0,0 +1,17 @@ +name: "forum/users-list" +skip: true +skip_reason: "Forum instance IP whitelist not configured for CI runner — enable when network access is granted" +service: forum +args: + - "users" + - "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"