mirror of
https://github.com/rancher/os.git
synced 2025-08-11 03:22:49 +00:00
Add test for vfat formatted config drive
This commit is contained in:
parent
68b005bc50
commit
5dd92a610b
@ -24,6 +24,7 @@ RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01prox
|
|||||||
libselinux1-dev \
|
libselinux1-dev \
|
||||||
locales \
|
locales \
|
||||||
module-init-tools \
|
module-init-tools \
|
||||||
|
mtools \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
qemu \
|
qemu \
|
||||||
|
@ -250,8 +250,10 @@ if [ "$QIND" != "1" ]; then
|
|||||||
CLOUD_CONFIG_DISK="-cdrom ${BASE}/state/configdrive.iso"
|
CLOUD_CONFIG_DISK="-cdrom ${BASE}/state/configdrive.iso"
|
||||||
;;
|
;;
|
||||||
fat)
|
fat)
|
||||||
echo "TODO: implement a vfat formated qemu img & copy the config files into it"
|
truncate --size 2M ${BASE}/state/configdrive.img
|
||||||
exit 1
|
mkfs.vfat -n config-2 ${BASE}/state/configdrive.img
|
||||||
|
mcopy -osi ${BASE}/state/configdrive.img ${CCROOT}/* ::
|
||||||
|
CLOUD_CONFIG_DISK="-hdb ${BASE}/state/configdrive.img"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
CLOUD_CONFIG_DISK="-fsdev local,security_model=passthrough,readonly,id=fsdev0,path=${CCROOT} \
|
CLOUD_CONFIG_DISK="-fsdev local,security_model=passthrough,readonly,id=fsdev0,path=${CCROOT} \
|
||||||
|
@ -28,3 +28,13 @@ func (s *QemuSuite) TestIsoCloudConfig(c *C) {
|
|||||||
|
|
||||||
s.CheckCall(c, `ls .ssh/authorized_keys`)
|
s.CheckCall(c, `ls .ssh/authorized_keys`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *QemuSuite) TestFatCloudConfig(c *C) {
|
||||||
|
runArgs := []string{
|
||||||
|
"--fresh",
|
||||||
|
"--cloud-config-fat",
|
||||||
|
}
|
||||||
|
s.RunQemuWith(c, runArgs...)
|
||||||
|
|
||||||
|
s.CheckCall(c, `ls .ssh/authorized_keys`)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user