mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
friskies³
This commit is contained in:
parent
7e55a791b6
commit
0f85ddbcff
2 changed files with 9 additions and 7 deletions
|
@ -130,7 +130,7 @@ EOF
|
|||
! _read_py "$file" "NONEXISTENT"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="NONEXISTENT")" == "YNH_NULL"
|
||||
|
||||
! ynh_write_var_in_file --file="$file" --key="ENABLE" -value="foobar"
|
||||
! ynh_write_var_in_file --file="$file" --key="ENABLE" --value="foobar"
|
||||
! _read_py "$file" "ENABLE"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="ENABLE")" == "YNH_NULL"
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
_make_dummy_manifest() {
|
||||
if [ ! -e $HTTPSERVER_DIR/dummy.tar.gz ]
|
||||
then
|
||||
pushd "$HTTPSERVER_DIR"
|
||||
pushd "$HTTPSERVER_DIR" >/dev/null
|
||||
mkdir dummy
|
||||
pushd dummy
|
||||
pushd dummy >/dev/null
|
||||
echo "Lorem Ipsum" > index.html
|
||||
echo '{"foo": "bar"}' > conf.json
|
||||
mkdir assets
|
||||
echo '.some.css { }' > assets/main.css
|
||||
echo 'var some="js";' > assets/main.js
|
||||
popd
|
||||
tar -czf dummy.tar.gz dummy
|
||||
popd
|
||||
popd >/dev/null
|
||||
tar -czf dummy.tar.gz dummy >/dev/null
|
||||
popd >/dev/null
|
||||
fi
|
||||
|
||||
cat << EOF
|
||||
|
@ -38,16 +38,17 @@ ynhtest_setup_source_nominal() {
|
|||
|
||||
test -e "$install_dir"
|
||||
test -e "$install_dir/index.html"
|
||||
test -e "$install_dir/assets"
|
||||
|
||||
ls -ld "$install_dir" | grep -q "drwxr-x--- . $app www-data"
|
||||
ls -l "$install_dir/index.html" | grep -q "\-rw-r----- . $app www-data"
|
||||
ls -ld "$install_dir/assets" | grep -q "drwxr-x--- . $app www-data"
|
||||
}
|
||||
|
||||
ynhtest_setup_source_no_group_in_manifest() {
|
||||
install_dir="$(mktemp -d -p $VAR_WWW)"
|
||||
_make_dummy_manifest > ../manifest.toml
|
||||
sed '/www-data/d' -i ../manifest.toml
|
||||
cat ../manifest.toml # debug
|
||||
|
||||
ynh_setup_source --dest_dir="$install_dir" --source_id="dummy"
|
||||
|
||||
|
@ -56,6 +57,7 @@ ynhtest_setup_source_no_group_in_manifest() {
|
|||
|
||||
ls -ld "$install_dir" | grep -q "drwxr-x--- . $app $app"
|
||||
ls -l "$install_dir/index.html" | grep -q "\-rw-r----- . $app $app"
|
||||
ls -ld "$install_dir/assets" | grep -q "drwxr-x--- . $app $app"
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue