Fixes #37919 - make sure sudo is installed #2079
Annotations
10 errors
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0028_rendered Kickstart default template should match snapshots
Rendered template Kickstart default did not match the snapshot..
--- expected
+++ actual
@@ -1 +1 @@
-"# This kickstart file was rendered from the Foreman provisioning template \"Kickstart default\".\n# for snapshot-ipv4-dhcp-el7 running CentOS 7 x86_64\n# Organization: Organization 1\n# Location: Location 1\n\ninstall\n\nurl --url http://mirror.centos.org/centos/7/os/x86_64\n\n\nlang en_US.UTF-8\nselinux --enforcing\nkeyboard us\n\nnetwork --device=00-f0-54-1a-7e-e0 --hostname snapshot-ipv4-dhcp-el7 --noipv6 --mtu=1142 --bootproto dhcp --nameserver=192.168.42.2,192.168.42.3\n\nrootpw --iscrypted $1$rtd8Ub7R$5Ohzuy8WXlkaK9cA2T1wb0\nfirewall --service=ssh\nauthconfig --useshadow --passalgo=sha512 --kickstart\ntimezone --utc UTC \n\nservices --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd\n\n\n\nbootloader --location=mbr --append=\"nofb quiet splash=quiet\" \n\nzerombr\nclearpart --all --initlabel\npart /boot --fstype ext3 --size=100 --asprimary\npart / --fstype ext3 --size=1024 --grow\npart swap --recommended\n\nskipx\ntext\nreboot\n\n%packages\n\nyum\ndhclient\nchrony\n-ntp\nwget\ndracut-fips\n-prelink\n\n%end\n\n\n%post --nochroot\nexec < /dev/tty3 > /dev/tty3\nchvt 3\n(\n\n\n\nchvt 1\n) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log\n%end\n\n\n%post\nexec < /dev/tty3 > /dev/tty3\nchvt 3\n(\nlogger \"Starting anaconda snapshot-ipv4-dhcp-el7 postinstall\"\n\necho \"Updating system time\"\nsystemctl enable --now chronyd\n/usr/bin/chronyc -a makestep\n/usr/sbin/hwclock --systohc\n\n\n\n\n\nrpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\n\n# registration_type = 'subscription_manager'\n \n echo \"##############################################################\"\n echo \"################# SUBSCRIPTION MANAGER #######################\"\n echo \"##############################################################\"\n echo\n echo \"Starting the subscription-manager registration process\"\n\n # Set up subscription-manager\n # Select package manager for the OS (sets the $PKG_MANAGER* variables)\nif [ -z \"$PKG_MANAGER\" ]; then\n if [ -f /etc/os-release ] ; then\n . /etc/os-release\n fi\n \n if [ \"${NAME%.*}\" = 'FreeBSD' ]; then\n PKG_MANAGER='pkg'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"\n elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then\n PKG_MANAGER='dnf'\n if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then\n PKG_MANAGER='yum'\n elif [ -f /etc/system-release ]; then\n PKG_MANAGER='yum'\n fi\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"\n elif [ -f /etc/debian_version ]; then\n PKG_MANAGER='apt-get'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"\n elif [ -f /etc/arch-release ]; then\n PKG_MANAGER='pacman'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"\n elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then\n PKG_MANAGER='zypper'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"\n fi\nfi\n\n# Define the path to rhsm.conf\nRHSM_CFG=/etc/rhsm/rhsm.conf\n\n\n\n# Prepare subscription-manager\nif ! [ -x \"$(command -v subscription-man
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0029_rendered Kickstart default finish template should match snapshots
Rendered template Kickstart default finish did not match the snapshot..
--- expected
+++ actual
@@ -1 +1 @@
-"\n\n\n\n\n\n\n\necho \"Updating system time\"\nsystemctl enable --now chronyd\n/usr/bin/chronyc -a makestep\n/usr/sbin/hwclock --systohc\n\n\nrpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\n\n# registration_type = 'subscription_manager'\n \n echo \"##############################################################\"\n echo \"################# SUBSCRIPTION MANAGER #######################\"\n echo \"##############################################################\"\n echo\n echo \"Starting the subscription-manager registration process\"\n\n # Set up subscription-manager\n # Select package manager for the OS (sets the $PKG_MANAGER* variables)\nif [ -z \"$PKG_MANAGER\" ]; then\n if [ -f /etc/os-release ] ; then\n . /etc/os-release\n fi\n \n if [ \"${NAME%.*}\" = 'FreeBSD' ]; then\n PKG_MANAGER='pkg'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"\n elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then\n PKG_MANAGER='dnf'\n if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then\n PKG_MANAGER='yum'\n elif [ -f /etc/system-release ]; then\n PKG_MANAGER='yum'\n fi\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"\n elif [ -f /etc/debian_version ]; then\n PKG_MANAGER='apt-get'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"\n elif [ -f /etc/arch-release ]; then\n PKG_MANAGER='pacman'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"\n elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then\n PKG_MANAGER='zypper'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"\n fi\nfi\n\n# Define the path to rhsm.conf\nRHSM_CFG=/etc/rhsm/rhsm.conf\n\n\n\n# Prepare subscription-manager\nif ! [ -x \"$(command -v subscription-manager)\" ] ; then\n $PKG_MANAGER_INSTALL subscription-manager\nelse\n echo \"subscription-manager is already installed!\"\n \nfi\n\n# Check if rhsm.conf exists\nif ! [ -f $RHSM_CFG ] ; then\n echo \"'$RHSM_CFG' not found, cannot configure subscription-manager\"\n exit 1\nfi\n\n\n# Configure subscription-manager\ntest -f $RHSM_CFG.bak || cp $RHSM_CFG $RHSM_CFG.bak\nsubscription-manager config \\\n --server.hostname=\"subscription.rhsm.redhat.com\" \\\n --server.port=\"443\" \\\n --server.prefix=\"/subscription\" \\\n --rhsm.repo_ca_cert=\"/etc/rhsm/ca/redhat-uep.pem\" \\\n --rhsm.baseurl=\"https://cdn.redhat.com\"\n\n# Older versions of subscription manager may not recognize\n# report_package_profile and package_profile_on_trans options.\n# So set them separately and redirect out & error to /dev/null\n# to fail silently.\nsubscription-manager config --rhsm.package_profile_on_trans=1 > /dev/null 2>&1 || true\nsubscription-manager config --rhsm.report_package_profile=1 > /dev/null 2>&1 || true\n\n# Configuration for EL6\nif grep --quiet full_refresh_on_yum $RHSM_CFG; then\n sed -i \"s/full_refresh_on_yum\\s*=.*$/full_refresh_on_yum = 1/g\" $RHSM_CFG\nelse\n full_refresh_config=\"#config for on-premise management\\nfull_refresh_on_yum = 1\"\n sed -i \"/baseurl/a $full_refresh_config\" $RHSM_CFG\nfi\n\n# Restart
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0036_rendered Preseed default finish template should match snapshots
Rendered template Preseed default finish did not match the snapshot..
--- expected
+++ actual
@@ -3,6 +3,45 @@
+# Select package manager for the OS (sets the $PKG_MANAGER* variables)
+if [ -z \"$PKG_MANAGER\" ]; then
+ if [ -f /etc/os-release ] ; then
+ . /etc/os-release
+ fi
+
+ if [ \"${NAME%.*}\" = 'FreeBSD' ]; then
+ PKG_MANAGER='pkg'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"
+ elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then
+ PKG_MANAGER='dnf'
+ if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then
+ PKG_MANAGER='yum'
+ elif [ -f /etc/system-release ]; then
+ PKG_MANAGER='yum'
+ fi
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"
+ elif [ -f /etc/debian_version ]; then
+ PKG_MANAGER='apt-get'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"
+ elif [ -f /etc/arch-release ]; then
+ PKG_MANAGER='pacman'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"
+ elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then
+ PKG_MANAGER='zypper'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"
+ fi
+fi
+
echo \"blacklist amodule\" >> /etc/modprobe.d/blacklist.conf
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0033_rendered Kickstart default user data template should match snapshots
Rendered template Kickstart default user data did not match the snapshot..
--- expected
+++ actual
@@ -1 +1 @@
-"#!/bin/bash\n\n\necho \"\" > /etc/hostname\n\nhostname \n\ncat > /etc/hosts << EOF\n127.0.0.1 snapshot-ipv4-dhcp-el7 localhost localhost.localdomain\n::1 ip6-localhost ip6-loopback\nfe00::0 ip6-localnet\nff00::0 ip6-mcastprefix\nff02::1 ip6-allnodes\nff02::2 ip6-allrouters\nEOF\n\n\n\n\n\n\n\necho \"Updating system time\"\nsystemctl enable --now chronyd\n/usr/bin/chronyc -a makestep\n/usr/sbin/hwclock --systohc\n\n\nrpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\n\n# registration_type = 'subscription_manager'\n \n echo \"##############################################################\"\n echo \"################# SUBSCRIPTION MANAGER #######################\"\n echo \"##############################################################\"\n echo\n echo \"Starting the subscription-manager registration process\"\n\n # Set up subscription-manager\n # Select package manager for the OS (sets the $PKG_MANAGER* variables)\nif [ -z \"$PKG_MANAGER\" ]; then\n if [ -f /etc/os-release ] ; then\n . /etc/os-release\n fi\n \n if [ \"${NAME%.*}\" = 'FreeBSD' ]; then\n PKG_MANAGER='pkg'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"\n elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then\n PKG_MANAGER='dnf'\n if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then\n PKG_MANAGER='yum'\n elif [ -f /etc/system-release ]; then\n PKG_MANAGER='yum'\n fi\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"\n elif [ -f /etc/debian_version ]; then\n PKG_MANAGER='apt-get'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"\n elif [ -f /etc/arch-release ]; then\n PKG_MANAGER='pacman'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"\n elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then\n PKG_MANAGER='zypper'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"\n fi\nfi\n\n# Define the path to rhsm.conf\nRHSM_CFG=/etc/rhsm/rhsm.conf\n\n\n\n# Prepare subscription-manager\nif ! [ -x \"$(command -v subscription-manager)\" ] ; then\n $PKG_MANAGER_INSTALL subscription-manager\nelse\n echo \"subscription-manager is already installed!\"\n \nfi\n\n# Check if rhsm.conf exists\nif ! [ -f $RHSM_CFG ] ; then\n echo \"'$RHSM_CFG' not found, cannot configure subscription-manager\"\n exit 1\nfi\n\n\n# Configure subscription-manager\ntest -f $RHSM_CFG.bak || cp $RHSM_CFG $RHSM_CFG.bak\nsubscription-manager config \\\n --server.hostname=\"subscription.rhsm.redhat.com\" \\\n --server.port=\"443\" \\\n --server.prefix=\"/subscription\" \\\n --rhsm.repo_ca_cert=\"/etc/rhsm/ca/redhat-uep.pem\" \\\n --rhsm.baseurl=\"https://cdn.redhat.com\"\n\n# Older versions of subscription manager may not recognize\n# report_package_profile and package_profile_on_trans options.\n# So set them separately and redirect out & error to /dev/null\n# to fail silently.\nsubscription-manager config --rhsm.package_profile_on_trans=1 > /dev/null 2>&1 || true\nsubscription-manager config --rhsm.report_package_profile=1 > /dev/null 2>&1 || true\n\n# Configuration for EL6\nif gre
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0017_rendered AutoYaST default user data template should match snapshots
Rendered template AutoYaST default user data did not match the snapshot..
--- expected
+++ actual
@@ -17,6 +17,45 @@
+# Select package manager for the OS (sets the $PKG_MANAGER* variables)
+if [ -z \"$PKG_MANAGER\" ]; then
+ if [ -f /etc/os-release ] ; then
+ . /etc/os-release
+ fi
+
+ if [ \"${NAME%.*}\" = 'FreeBSD' ]; then
+ PKG_MANAGER='pkg'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"
+ elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then
+ PKG_MANAGER='dnf'
+ if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then
+ PKG_MANAGER='yum'
+ elif [ -f /etc/system-release ]; then
+ PKG_MANAGER='yum'
+ fi
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"
+ elif [ -f /etc/debian_version ]; then
+ PKG_MANAGER='apt-get'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"
+ elif [ -f /etc/arch-release ]; then
+ PKG_MANAGER='pacman'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"
+ elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then
+ PKG_MANAGER='zypper'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"
+ fi
+fi
+
echo \"blacklist amodule\" >> /etc/modprobe.d/blacklist.conf
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0042_rendered UserData default template should match snapshots
Rendered template UserData default did not match the snapshot..
--- expected
+++ actual
@@ -23,6 +23,45 @@
- |
+ # Select package manager for the OS (sets the $PKG_MANAGER* variables)
+ if [ -z \"$PKG_MANAGER\" ]; then
+ if [ -f /etc/os-release ] ; then
+ . /etc/os-release
+ fi
+
+ if [ \"${NAME%.*}\" = 'FreeBSD' ]; then
+ PKG_MANAGER='pkg'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"
+ elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then
+ PKG_MANAGER='dnf'
+ if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then
+ PKG_MANAGER='yum'
+ elif [ -f /etc/system-release ]; then
+ PKG_MANAGER='yum'
+ fi
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"
+ elif [ -f /etc/debian_version ]; then
+ PKG_MANAGER='apt-get'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"
+ elif [ -f /etc/arch-release ]; then
+ PKG_MANAGER='pacman'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"
+ elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then
+ PKG_MANAGER='zypper'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"
+ fi
+ fi
+
- |
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0039_rendered Preseed default user data template should match snapshots
Rendered template Preseed default user data did not match the snapshot..
--- expected
+++ actual
@@ -20,6 +20,45 @@
+# Select package manager for the OS (sets the $PKG_MANAGER* variables)
+if [ -z \"$PKG_MANAGER\" ]; then
+ if [ -f /etc/os-release ] ; then
+ . /etc/os-release
+ fi
+
+ if [ \"${NAME%.*}\" = 'FreeBSD' ]; then
+ PKG_MANAGER='pkg'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"
+ elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then
+ PKG_MANAGER='dnf'
+ if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then
+ PKG_MANAGER='yum'
+ elif [ -f /etc/system-release ]; then
+ PKG_MANAGER='yum'
+ fi
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"
+ elif [ -f /etc/debian_version ]; then
+ PKG_MANAGER='apt-get'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"
+ elif [ -f /etc/arch-release ]; then
+ PKG_MANAGER='pacman'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"
+ elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then
+ PKG_MANAGER='zypper'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"
+ fi
+fi
+
echo \"blacklist amodule\" >> /etc/modprobe.d/blacklist.conf
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0002_rendered CloudInit default template should match snapshots
Rendered template CloudInit default did not match the snapshot..
--- expected
+++ actual
@@ -1 +1 @@
-"\n#cloud-config\nhostname: snapshot-ipv4-dhcp-el7\nfqdn: snapshot-ipv4-dhcp-el7\nmanage_etc_hosts: true\nusers: {}\nruncmd:\n- |\n echo \"\" > /etc/hostname\n \n hostname \n \n cat > /etc/hosts << EOF\n 127.0.0.1 snapshot-ipv4-dhcp-el7 localhost localhost.localdomain\n ::1 ip6-localhost ip6-loopback\n fe00::0 ip6-localnet\n ff00::0 ip6-mcastprefix\n ff02::1 ip6-allnodes\n ff02::2 ip6-allrouters\n EOF\n- |\n \n- |\n \n echo \"Updating system time\"\n systemctl enable --now chronyd\n /usr/bin/chronyc -a makestep\n /usr/sbin/hwclock --systohc\n- |\n rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm\n- |\n # registration_type = 'subscription_manager'\n \n echo \"##############################################################\"\n echo \"################# SUBSCRIPTION MANAGER #######################\"\n echo \"##############################################################\"\n echo\n echo \"Starting the subscription-manager registration process\"\n \n # Set up subscription-manager\n # Select package manager for the OS (sets the $PKG_MANAGER* variables)\n if [ -z \"$PKG_MANAGER\" ]; then\n if [ -f /etc/os-release ] ; then\n . /etc/os-release\n fi\n \n if [ \"${NAME%.*}\" = 'FreeBSD' ]; then\n PKG_MANAGER='pkg'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"\n elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then\n PKG_MANAGER='dnf'\n if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then\n PKG_MANAGER='yum'\n elif [ -f /etc/system-release ]; then\n PKG_MANAGER='yum'\n fi\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"\n elif [ -f /etc/debian_version ]; then\n PKG_MANAGER='apt-get'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"\n elif [ -f /etc/arch-release ]; then\n PKG_MANAGER='pacman'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"\n elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then\n PKG_MANAGER='zypper'\n PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"\n PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"\n PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"\n fi\n fi\n \n # Define the path to rhsm.conf\n RHSM_CFG=/etc/rhsm/rhsm.conf\n \n \n \n # Prepare subscription-manager\n if ! [ -x \"$(command -v subscription-manager)\" ] ; then\n $PKG_MANAGER_INSTALL subscription-manager\n else\n echo \"subscription-manager is already installed!\"\n \n fi\n \n # Check if rhsm.conf exists\n if ! [ -f $RHSM_CFG ] ; then\n echo \"'$RHSM_CFG' not found, cannot configure subscription-manager\"\n exit 1\n fi\n \n \n # Configure subscription-manager\n test -f $RHSM_CFG.bak || cp $RHSM_CFG $RHSM_CFG.bak\n subscription-manager config \\\n --server.hostname=\"subscription.rhsm.redhat.com\" \\\n --server.port=\"443\" \\\n --server.prefix=\"/subscription\" \\\n --rhsm.repo_ca_cert=\"/etc/rhsm/ca/redhat-uep.pem\" \\\n --rhsm.baseurl=\"https://cdn.redhat.com\"\n \n # Older versions of subscription manager may not recognize\n # report_package_profile and package_profile_on_trans options.\
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0066_rendered remote_execution_ssh_keys template should match snapshots
Rendered template remote_execution_ssh_keys did not match the snapshot..
--- expected
+++ actual
@@ -1,2 +1,41 @@
"
+# Select package manager for the OS (sets the $PKG_MANAGER* variables)
+if [ -z \"$PKG_MANAGER\" ]; then
+ if [ -f /etc/os-release ] ; then
+ . /etc/os-release
+ fi
+
+ if [ \"${NAME%.*}\" = 'FreeBSD' ]; then
+ PKG_MANAGER='pkg'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"
+ elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then
+ PKG_MANAGER='dnf'
+ if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then
+ PKG_MANAGER='yum'
+ elif [ -f /etc/system-release ]; then
+ PKG_MANAGER='yum'
+ fi
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"
+ elif [ -f /etc/debian_version ]; then
+ PKG_MANAGER='apt-get'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"
+ elif [ -f /etc/arch-release ]; then
+ PKG_MANAGER='pacman'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"
+ elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then
+ PKG_MANAGER='zypper'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"
+ fi
+fi
+
"
|
Run rake test:units:
test/unit/foreman/renderer_test.rb#L39
Failure: test_0014_rendered AutoYaST default template should match snapshots
Rendered template AutoYaST default did not match the snapshot..
--- expected
+++ actual
@@ -98,6 +98,45 @@
+# Select package manager for the OS (sets the $PKG_MANAGER* variables)
+if [ -z \"$PKG_MANAGER\" ]; then
+ if [ -f /etc/os-release ] ; then
+ . /etc/os-release
+ fi
+
+ if [ \"${NAME%.*}\" = 'FreeBSD' ]; then
+ PKG_MANAGER='pkg'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} delete -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} install -y\"
+ elif [ -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/amazon-linux-release -o -f /etc/system-release ]; then
+ PKG_MANAGER='dnf'
+ if [ -f /etc/redhat-release -a \"${VERSION_ID%.*}\" -le 7 ]; then
+ PKG_MANAGER='yum'
+ elif [ -f /etc/system-release ]; then
+ PKG_MANAGER='yum'
+ fi
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} upgrade -y\"
+ elif [ -f /etc/debian_version ]; then
+ PKG_MANAGER='apt-get'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} install -y\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} remove -y\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o APT::Get::Upgrade-Allow-New='true' upgrade -y\"
+ elif [ -f /etc/arch-release ]; then
+ PKG_MANAGER='pacman'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --noconfirm -S\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --noconfirm -R\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --noconfirm -S\"
+ elif [ x$ID = xopensuse-tumbleweed -o x$ID = xsles ]; then
+ PKG_MANAGER='zypper'
+ PKG_MANAGER_INSTALL=\"${PKG_MANAGER} --non-interactive install --auto-agree-with-licenses\"
+ PKG_MANAGER_REMOVE=\"${PKG_MANAGER} --non-interactive remove\"
+ PKG_MANAGER_UPGRADE=\"${PKG_MANAGER} --non-interactive update\"
+ fi
+fi
+
echo \"blacklist amodule\" >> /etc/modprobe.d/blacklist.conf
|
Loading