summaryrefslogtreecommitdiff
path: root/test/librechroot-test.sh
blob: d8f7299dfe5774ccd5cf416b59fa9153f6cd0e30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env roundup

describe librechroot

before() {
	tmpdir=$(mktemp -d --tmpdir test-librechroot.XXXXXXXXXXXX)
	mkdir -p "$XDG_CONFIG_HOME"/libretools
	echo "CHROOTDIR='$tmpdir'" > "$XDG_CONFIG_HOME"/libretools/chroot.conf
}

after() {
	rm -rf -- "$tmpdir" "$XDG_CONFIG_HOME"
}

it_creates_repo_for_new_chroots() {
	sudo librechroot run test -r /repo/repo.db
}