Project

General

Profile

Bug #26612

Renderer test suite do not like snippet-in-snippet

Added by Lukas Zapletal 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

When we include a snippet from a snippet, renderer test blows up:

Foreman::Exception: ERF42-7327 [Foreman::Exception]: The snippet 'pxegrub2_chainload' threw an error: The specified snippet 'pxegrub2_discovery' does not exist, or is not a snippet.
    lib/foreman/renderer/scope/macros/snippet_rendering.rb:18:in `snippet'
    lib/foreman/renderer/scope/macros/base.rb:56:in `indent'
    lib/foreman/renderer/unsafe_mode_renderer.rb:7:in `render'
    lib/foreman/renderer/base_renderer.rb:16:in `render'
    lib/foreman/renderer.rb:45:in `render'
    app/models/template.rb:173:in `render'
    lib/foreman/renderer/scope/macros/snippet_rendering.rb:24:in `snippet'
    lib/foreman/renderer/unsafe_mode_renderer.rb:7:in `render'
    lib/foreman/renderer/base_renderer.rb:16:in `render'
    lib/foreman/renderer.rb:45:in `render'
    test/unit/foreman/renderer_test.rb:48:in `render_template'
    test/unit/foreman/renderer_test.rb:40:in `assert_template'
    test/unit/foreman/renderer_test.rb:32:in `block (3 levels) in <class:RendererTest>' (Foreman::Exception)
/home/jenkins/workspace/test_develop_pr_core/database/postgresql/ruby/2.4/slave/fast/test/unit/foreman/renderer_test.rb:32    

Since it is blocking 1.22 branching I am creating this ticket and refactor templates until we can figure this out. The converstaion is at https://github.com/theforeman/foreman/pull/6678

Associated revisions

Revision bbc84f6f (diff)
Added by Timo Goebel 9 months ago

fixes #26612 - snapshots for nested snippets

History

#1 Updated by The Foreman Bot 9 months ago

  • Assignee set to Timo Goebel
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6687 added

#2 Updated by Timo Goebel 9 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF