summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-11-18 17:03:09 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2022-11-18 17:03:09 +0100
commit923b7823970988a9cf67c4343591ef0409b8fe08 (patch)
treea8be37c23ab40cfeed19215792d8159654c3c4d7
parentb929d162791f56eac01d2f0e90c3f4baba6cca0a (diff)
downloadalpine-conf-923b7823970988a9cf67c4343591ef0409b8fe08.zip
tests: add fake findfs and blkid for testing setup-lbu
-rwxr-xr-xtests/bin/blkid11
-rwxr-xr-xtests/bin/findfs10
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/bin/blkid b/tests/bin/blkid
new file mode 100755
index 0000000..ccf7e43
--- /dev/null
+++ b/tests/bin/blkid
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+case "$1" in
+ /dev/vda1)
+ echo "$1:" 'TYPE="vfat" LABEL="APKOVL"'
+ ;;
+ /dev/mmcblk0p1)
+ echo "$1:" 'TYPE="vfat" UUID="AAAA-BBBB"'
+ ;;
+esac
+
diff --git a/tests/bin/findfs b/tests/bin/findfs
new file mode 100755
index 0000000..6d67767
--- /dev/null
+++ b/tests/bin/findfs
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+case "$1" in
+ LABEL=APKOVL)
+ echo /dev/vda1
+ ;;
+ UUID=AAAA-BBBB)
+ echo /dev/mmcblk0p1
+ ;;
+esac