Skip to content

Commit

Permalink
QE: Handle 5.1 when resolving product_version
Browse files Browse the repository at this point in the history
  • Loading branch information
srbarrios committed Feb 19, 2025
1 parent 0df5ffb commit 95860a6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions testsuite/features/support/commonlib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def product_version
raise NotImplementedError, 'Could not determine product version'
end

# Retrieves the full product version using the 'salt-call' command.
# Retrieves the full product version using the 'venv-salt-call' command.
#
# @return [String, nil] The full product version if the command execution was successful and
# the output is not empty, otherwise nil.
Expand All @@ -70,13 +70,15 @@ def product_version_full
out.strip if code.zero? && !out.nil?
end

# TODO: All our current supported versions are using Salt Bundle, consider to remove this method
# Refactoring all the code call it.
# Determines whether to use the Salt bundle based on the product and product version.
#
# @return [Boolean] true if the product is 'Uyuni' or the product version is 'head', '5.0', '4.3', or '4.2'
# - false otherwise
def use_salt_bundle
# Use venv-salt-minion in Uyuni, or SUMA Head, 5.0, 4.2 and 4.3
product == 'Uyuni' || %w[head 5.0 4.3 4.2].include?(product_version)
# Use venv-salt-minion in Uyuni, or SUMA Head, 5.1, 5.0, 4.2 and 4.3
product == 'Uyuni' || %w[develHead 5.1 5.0 4.3 4.2].include?(product_version)
end

# WARN: It's working for /24 mask, but couldn't not work properly with others
Expand Down

0 comments on commit 95860a6

Please sign in to comment.