Skip to content

Commit

Permalink
Remove functional tests (will be added in separate PR)
Browse files Browse the repository at this point in the history
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
  • Loading branch information
lmlg committed Oct 3, 2023
1 parent 0a15c20 commit 47673d5
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions tests/scripts/actionutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,16 @@ function add_encrypted_osds() {
# Add OSDs backed by loop devices on /mnt (ephemeral "large" disk attached to GitHub action runners)
i=0
for l in a b c; do
data_file="$(sudo mktemp -p /mnt data.XXXX.img)"
sudo truncate -s 1G "${data_file}"
data_dev="$(sudo losetup --show -f "${data_file}")"

wal_file="$(sudo mktemp -p /mnt wal.XXXX.img)"
sudo truncate -s 1G "${wal_file}"
wal_dev="$(sudo losetup --show -f "${wal_file}")"

db_file="$(sudo mktemp -p /mnt db.XXXX.img)"
sudo truncate -s 1G "${db_file}"
db_dev="$(sudo losetup --show -f "${db_file}")"
loop_file="$(sudo mktemp -p /mnt XXXX.img)"
sudo truncate -s 1G "${loop_file}"
loop_dev="$(sudo losetup --show -f "${loop_file}")"

# XXX: the block-devices plug doesn't allow accessing /dev/loopX
# devices so we make those same devices available under alternate
# names (/dev/sdiY) that are not used inside GitHub Action runners
data_minor="${data_dev##/dev/loop}"
wal_minor="${wal_dev##/dev/loop}"
db_minor="${db_dev##/dev/loop}"
sudo mknod -m 0660 "/dev/sdi${l}" b 7 "${data_minor}"
sudo mknod -m 0660 "/dev/sdi${l}x" b 7 "${wal_minor}"
sudo mknod -m 0660 "/dev/sdi${l}y" b 7 "${db_minor}"
sudo microceph disk add "/dev/sdi${l}" --wipe --encrypt --wal-device "/dev/sdi${l}x" --wal-wipe --wal-encrypt --db-device "/dev/sdi${l}y" --db-wipe --db-encrypt
minor="${loop_dev##/dev/loop}"
sudo mknod -m 0660 "/dev/sdi${l}" b 7 "${minor}"
sudo microceph disk add --wipe "/dev/sdi${l}" --encrypt
done

# Wait for OSDs to become up
Expand Down

0 comments on commit 47673d5

Please sign in to comment.