Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1940 from SvenDowideit/os-1643-vfat-config-drive
Browse files Browse the repository at this point in the history
Add test for vfat formatted config drive
  • Loading branch information
SvenDowideit authored Jun 23, 2017
2 parents 68b005b + 09bd518 commit a2e3c9a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01prox
libselinux1-dev \
locales \
module-init-tools \
mtools \
openssh-client \
pkg-config \
qemu \
Expand Down
6 changes: 4 additions & 2 deletions scripts/run
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,10 @@ if [ "$QIND" != "1" ]; then
CLOUD_CONFIG_DISK="-cdrom ${BASE}/state/configdrive.iso"
;;
fat)
echo "TODO: implement a vfat formated qemu img & copy the config files into it"
exit 1
truncate --size 2M ${BASE}/state/configdrive.img
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} \
Expand Down
10 changes: 10 additions & 0 deletions tests/cloud_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,13 @@ func (s *QemuSuite) TestIsoCloudConfig(c *C) {

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`)
}

0 comments on commit a2e3c9a

Please sign in to comment.