Skip to content

E2E test: SEO plugin worked-example from doc §14 (10 steps, end-to-end) #269

@tayebmokni

Description

@tayebmokni

Summary

Build the e2e integration test that exercises the full SEO plugin flow described in doc §14:

  1. Build the plugin with gonext plugin dev
  2. Install + activate via admin API
  3. Hit /api/posts/{id}/render and assert <meta> tags are injected
  4. Hit /sitemap.xml (via root alias) and assert XML response
  5. Fire cron.rebuild_sitemap manually, assert plg tables updated
  6. Publish 1.4.3 update, atomic swap, assert no downtime
  7. Trip a fuel cap with malformed input, assert plugin marked degraded and post still renders

This is the gold-standard integration test for the entire plugin subsystem. If this passes, the system is viable.

Design reference

  • docs/02-plugin-system.md §14

Acceptance criteria

  • Sample SEO plugin source in testdata/plugins/gn-seo/ (Go SDK based)
  • Plugin implements: filter_content, route_sitemap, cron_rebuild_sitemap, an admin dashboard React component
  • e2e test driver spins up a local stack (Postgres, Redis, the API server) via testcontainers
  • Each of the 10 steps in §14 has its own subtest with assertions matching the docs narrative
  • Latency assertion: filter dispatch in step 6 measured at <500µs end-to-end on CI hardware
  • Trap recovery assertion in step 10: after fuel exhaustion, subsequent renders succeed (handler skipped, value flows unchanged)
  • Test runs in CI on every PR touching area:plugin-host
  • Documentation: testdata/plugins/gn-seo/README.md explains how the test corresponds to §14 steps

Dependencies

basically every other plugin-host issue — this is the integration that proves they work together

Complexity

XL

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions