fixtures.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * v3 用例的种子数据。
  4. *
  5. * 不同环境(local / staging / prod)数据不同:换环境时在 config.local.php 的
  6. * `fixtures` 里覆盖要改的键,不要改这里。
  7. * 当前取值来自本地开发库实测 + openapi spec 里的 example。
  8. */
  9. return [
  10. // 一个 translation 类型、有翻译进度与译文数据的 channel
  11. 'channel' => '4414c96e-4903-11ef-af72-571c3fee08e6',
  12. // tipitaka-chapter-channels 用的章节坐标:一章有若干译文版本即可,与 server 无关
  13. 'chapter_channels_book' => 93,
  14. 'chapter_channels_para' => 5,
  15. // reactions / reactions/tally 用的 target(collection)
  16. 'target_id' => '5b4511c1-c99f-47e7-9798-97b9e5229e18',
  17. // tipitaka-related-paragraphs 的两组互斥坐标
  18. 'book' => 1,
  19. 'para' => 2,
  20. 'book_name' => 'dn1',
  21. 'cs_para' => 4,
  22. // 搜索关键词(search/{id} 的 200 用例从它的检索结果里取文档 id)
  23. 'search_q' => 'dukkha',
  24. // discussions 写用例挂的句子:放在测试账号自己的 channel 里、由测试账号编辑,
  25. // 这样即便有通知也只发给自己(用例本身还会带 notify=false)。换环境时按需覆盖。
  26. 'discussion_sentence' => 'ee5259be-5d1e-4408-a2a6-566a5773eef1',
  27. // discussion_sentence 所在的 channel(agent 授权的范围)
  28. 'discussion_channel' => '1721b7fa-e471-46fd-b860-64b9e79d370e',
  29. // agent 代写用例:归测试账号所有的 AI 模型 uid,按环境在 config.local.php 里配,没配则 SKIP
  30. 'agent_model' => null,
  31. // groups 用例:测试账号名下的团队名(不存在就经 v2 建一个,跑完保留)与要拉进团队的另一个账号。
  32. // 第二个账号用户名按环境覆盖;留空则加人 / 改角色 / 移人那一轮 SKIP。
  33. 'group_name' => 'api-test 团队',
  34. 'group_member_username' => 'test162',
  35. // 一个已注册账号的邮箱(email-certifications 的「已注册」用例;只校验、不发信)。
  36. // 留空则该用例 SKIP。
  37. 'registered_email' => getenv('API_TEST_REGISTERED_EMAIL') ?: null,
  38. ];