[rhinstaller/anaconda/pulls/115 master] Add kickstart test to test vlan creation

vpodzime installerbot-noreply at redhat.com
Mon May 25 07:34:01 UTC 2015


> @@ -0,0 +1,51 @@
> +url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basearch/os/"
> +install
> +network --device=link --bootproto=dhcp
> +# Create testing vlan interface
> +network --device=link --vlanid=150 --bootproto=dhcp
> +
> +bootloader --timeout=1
> +zerombr
> +clearpart --all
> +part --fstype=ext4 --size=4400 /
> +part --fstype=ext4 --size=500 /boot
> +part --fstype=swap --size=500 swap
> +
> +keyboard us
> +lang en
> +timezone America/New_York
> +rootpw qweqwe
> +shutdown
> +
> +%packages
> +%end
> +
> +%post
> +CONTENT=$(cat /etc/sysconfig/network-scripts/$(ls /etc/sysconfig/network-scripts/ | grep ".150"))
> +DEVICE=$(sed -n 's/^PHYSDEV=//p' <<< "$CONTENT")
> +
> +echo "$CONTENT" > /root/IFCFG_FILE
> +echo "$DEVICE" > /root/DEVICE_NAME
> +
> +if [[ $CONTENT == "" ]]; then
> +   echo "ERROR: ifcfg file for vlan missing" >> /root/RESULT
> +   exit 0
> +fi
> +
> +if [[ $CONTENT != *"BOOTPROTO=dhcp"* ]]; then
> +   echo "ERROR: BOOTPROTO is not present" >> /root/RESULT
> +fi
> +
> +if [[ $CONTENT != *"NAME=${DEVICE}.150"* ]]; then
> +   echo "ERROR: NAME is not present" >> /root/RESULT
> +fi
> +
> +if [[ $CONTENT != *"DEVICE=${DEVICE}.150"* ]]; then
> +   echo "ERROR: DEVICE is not present" >> /root/RESULT
> +fi

Any message different from ``SUCCESS`` is automatically considered an error message. We don't need to prefix it explicitly and it could result in weird test results report like *"ERROR: ERROR: DEVICE is not present"* because other tests don't use the prefix.

-- 
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/115#discussion_r30966568


More information about the anaconda-patches mailing list