mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
friskies²
This commit is contained in:
parent
bc3e36abb3
commit
2640dd3171
3 changed files with 10 additions and 9 deletions
|
@ -63,7 +63,7 @@ EOF
|
|||
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="user")" == "camille"
|
||||
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after"YNH_ICI")" == "Hello world"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after="YNH_ICI")" == "Hello world"
|
||||
|
||||
! _read_py "$file" "NONEXISTENT"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="NONEXISTENT")" == "YNH_NULL"
|
||||
|
@ -123,8 +123,8 @@ EOF
|
|||
ynh_write_var_in_file --file="$file" --key="ldap_base" --value="ou=users,dc=yunohost,dc=org"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org"
|
||||
|
||||
ynh_write_var_in_file --file="$file" --key="TITLE" --value="YOLO" --after"YNH_ICI"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after"YNH_ICI")" == "YOLO"
|
||||
ynh_write_var_in_file --file="$file" --key="TITLE" --value="YOLO" --after="YNH_ICI"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after="YNH_ICI")" == "YOLO"
|
||||
|
||||
! ynh_write_var_in_file --file="$file" --key="NONEXISTENT" --value="foobar"
|
||||
! _read_py "$file" "NONEXISTENT"
|
||||
|
@ -251,8 +251,8 @@ EOF
|
|||
test "$(_read_ini "$file" "url")" == "https://domain.tld/foobar"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://domain.tld/foobar"
|
||||
|
||||
ynh_write_var_in_file "$file" "ldap_base" "ou=users,dc=yunohost,dc=org"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org"
|
||||
ynh_write_var_in_file --file="$file" --key="ldap_base" --value="ou=users,dc=yunohost,dc=org"
|
||||
test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org"
|
||||
|
||||
! ynh_write_var_in_file --file="$file" --key="nonexistent" "foobar"
|
||||
! _read_ini "$file" "nonexistent"
|
||||
|
|
|
@ -33,7 +33,6 @@ EOF
|
|||
ynhtest_setup_source_nominal() {
|
||||
install_dir="$(mktemp -d -p $VAR_WWW)"
|
||||
_make_dummy_manifest > ../manifest.toml
|
||||
cat ../manifest.toml # debug
|
||||
|
||||
ynh_setup_source --dest_dir="$install_dir" --source_id="dummy"
|
||||
|
||||
|
@ -48,6 +47,7 @@ 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"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ EOF
|
|||
ynh_config_add --template="$template" --destination="$VAR_WWW/config.txt"
|
||||
|
||||
test "$(cat $VAR_WWW/config.txt)" == "$(echo -ne 'app=ynhtest\nfoo=bar')"
|
||||
test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw-r----- 1 ynhtest ynhtest"
|
||||
test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw------- 1 ynhtest ynhtest"
|
||||
}
|
||||
|
||||
ynhtest_simple_template_system_config() {
|
||||
|
@ -35,7 +35,7 @@ EOF
|
|||
|
||||
ynh_config_add --template="$template" --destination="/etc/cron.d/ynhtest_config"
|
||||
|
||||
test "$(cat $VAR_WWW/config.txt)" == "$(echo -ne 'app=ynhtest\nfoo=bar')"
|
||||
test "$(cat /etc/cron.d/ynhtest_config)" == "$(echo -ne 'app=ynhtest\nfoo=bar')"
|
||||
test "$(ls -l /etc/cron.d/ynhtest_config | cut -d' ' -f1-4)" == "-r-------- 1 root root"
|
||||
|
||||
rm -f /etc/cron.d/ynhtest_config
|
||||
|
@ -53,11 +53,12 @@ app={{ app }}
|
|||
EOF
|
||||
|
||||
foo="bar"
|
||||
install_dir="$VAR_WWW"
|
||||
|
||||
ynh_config_add --template="$template" --destination="$VAR_WWW/config.txt" --jinja
|
||||
|
||||
test "$(cat $VAR_WWW/config.txt)" == "$(echo -ne 'app=ynhtest\nfoo=true')"
|
||||
test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw-r----- 1 ynhtest ynhtest"
|
||||
test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw------- 1 ynhtest ynhtest"
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue