Project

General

Profile

Feature #31370

Template snapshot multi-host render tests

Added by Lukas Zapletal 11 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
Templates
Target version:
-
Difficulty:
medium
Triaged:
Yes
Bugzilla link:

Description

Our snapshot template render test and generator only supports one host stub (ipv4 single NIC redhat OS). In order to test more ERB codepaths, we need a way to create snapshots against multiple host stubs (e.g. IPv6, dualstack, static IPv4 or IPv6, debian family). In order to do that, template metadata can be extended to define list of host stubs to create and test snapshots against.


Related issues

Related to Foreman - Feature #31363: PXE templates should support dual stack hostsReady For Testing
Related to Foreman - Feature #31407: Remove spaces from snapshot testsClosed

Associated revisions

Revision 641c3f4a (diff)
Added by Lukáš Zapletal 6 months ago

Fixes #31370 - multi-host stub template snapshots (#8149)

Our snapshot template render test and generator only supports one host stub (ipv4 single NIC redhat OS). In order to test more ERB codepaths, we need a way to create snapshots against multiple host stubs (e.g. IPv6, dualstack, static IPv4 or IPv6, debian family). In order to do that, template metadata can be extended to define list of host stubs to create and test snapshots against.

Snapshot files are now named ProvisioningTemplate/PXEGrub/Kickstart_default_PXEGrub.host4and6.snap.txt where host4and6 is the stub name, this implements the following for starters:

  • host - the original simple host
  • host6 - IPv6 provisioning NIC
  • host4and6 - dualstack provisioning NIC
  • host4static - single stack IPv4 with static network credentials
  • host6static - single stack IPv4 with static network credentials

Revision 29ee5f48 (diff)
Added by Ondřej Ezr 5 months ago

Refs #31370 - simplify factory traits

In 641c3f4a9b we've introduced a factory trait for smart_proxy factory,
but instead of adding it to parent factory we added to all its children.

This is fixing that and simplifying the factories.

History

#1 Updated by The Foreman Bot 11 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8149 added

#2 Updated by Ronny Bremer 11 months ago

  • Related to Feature #31363: PXE templates should support dual stack hosts added

#3 Updated by Lukas Zapletal 11 months ago

#4 Updated by The Foreman Bot 6 months ago

  • Fixed in Releases 3.0.0 added

#5 Updated by Anonymous 6 months ago

  • Status changed from Ready For Testing to Closed

#6 Updated by The Foreman Bot 5 months ago

  • Pull request https://github.com/theforeman/foreman/pull/8530 added

Also available in: Atom PDF