Skip to content

Convert render_static_html.rb to rspec

What does this MR do and why?

Related: Tracking Issue: Implement GLFM scripts per the ... (#361241 - closed)

Converts render_static_html.rb to rspec

  • In order to fully exercise the backend markdown rendering stack, we need to call via the API instead of directly calling Banzai.
  • We also want easier and more complete control over fixture data, so we want to use the transactional fixture test environment instead of dev environment
  • For both of these reasons, we are converting the render_static_html.rb script to be based on rspec instead of a plain ruby executable script.
  • This MR also adds some basic fixtures (e.g. project, snippets, wiki) which will be needed to support future example snapshot entries.

See also docs on update-example-snapshots.rb script: https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#update-example-snapshotsrb-script

See the GLFM Specification Guide development documentation for much more context on all of this work: https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide

How to set up and validate locally

  1. Run scripts/glfm/update-example-snapshots.rb and ensure there are no failures or changes (expected changes to *.yml files may occur after a rebase).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chad Woolley

Merge request reports

Loading