Skip to content

Various clean ups to Gitaly's tests and templating

Sami Hiltunen requested to merge smh-clean-gitaly-config into master

What does this MR do?

This MR contains various clean ups to tests and templating logic of the Gitaly package. Mainly, it removes a bunch of regex assertions and replaces them with a equality assertion of the entire config. This ensures the entire configs content is asserted, not just what the regexes match. Likewise, this also removes the dependency on specific formatting of the config and rather ensures that the resulting TOML config is correct. This makes it easier to iterate later on the config generation in gitaly#4467 (closed).

Various test cases are also collapsed into the custom config values test. This eases maintenance by removing unnecessary test duplication.

Some unneeded templating logic around the rate limiting is also removed. Our aim is to remove the special templating logic in Omnibus and instead rely on the logic inside Gitaly.

This is a preparatory MR for gitaly#4467 (closed). I'll later open an MR that performs the same set of changes for Gitaly as !6373 (merged) performs for Praefect.

Related issues

gitaly#4467 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for the GitLab Chart opened
Edited by Mitchell Nielsen

Merge request reports