File tree 2 files changed +44
-0
lines changed
crates/spfs/tests/integration/unprivileged
2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Copyright (c) Contributors to the SPK project.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+ # https://github.com/spkenv/spk
6
+
7
+ set -o errexit
8
+
9
+ # when using fuse, the local repo should not get a renders directory created for
10
+ # the current user
11
+
12
+ temp_repo=$( mktemp -d)
13
+
14
+ cleanup () {
15
+ rm -rf " $temp_repo "
16
+ }
17
+
18
+ trap cleanup EXIT
19
+
20
+ export SPFS_STORAGE_ROOT=" $temp_repo "
21
+
22
+ # create some content that would need to be rendered
23
+ SPFS_FILESYSTEM_BACKEND=OverlayFsWithFuse spfs run - -- bash -c " echo hello > /spfs/hello.txt && spfs commit layer -t some-content"
24
+
25
+ # something that will open the local repo, using fuse
26
+ SPFS_FILESYSTEM_BACKEND=OverlayFsWithFuse spfs run some-content -- true
27
+
28
+ # the renders directory should not have been created
29
+ if test -d " $temp_repo /renders" ; then
30
+ echo " renders directory was not supposed to be created on step 1"
31
+ exit 1
32
+ fi
33
+
34
+ # something that will open the local repo, not using fuse
35
+ SPFS_FILESYSTEM_BACKEND=OverlayFsWithRenders spfs run some-content -- true
36
+
37
+ # the renders directory should have been created, to prove the behavior is
38
+ # different when not using fuse
39
+ if test ! -d " $temp_repo /renders" ; then
40
+ echo " renders directory was expected to be created on step 2"
41
+ exit 1
42
+ fi
43
+
Original file line number Diff line number Diff line change 402
402
" mkrecipe" ,
403
403
" mksource" ,
404
404
" mksrc" ,
405
+ " mktemp" ,
405
406
" modversions" ,
406
407
" mountpoint" ,
407
408
" mpfr" ,
You can’t perform that action at this time.
0 commit comments