This commit is contained in:
aynic.os 2021-05-12 18:47:13 +02:00
parent 68ccdcb394
commit 2dfa0ee7d2
3 changed files with 24 additions and 16 deletions

View File

@ -32,6 +32,10 @@ i_am_root() {
[ $(id -u) -eq 0 ]
}
i_am_xbian() {
[[ "$USER" == "xbian" ]]
}
i_should_install() {
[[ ! -f ~/.zen/secret.june ]]
}

View File

@ -35,7 +35,7 @@ check_jaklis
echo "Sécurisation DEFCON SUDOERS FAIL2BAN"
## XBIAN fail2ban ERROR correction ##
#[....] Starting authentication failure monitor: fail2ban No file(s) found for glob /var/log/auth.log
[[ "$USER" == "xbian" ]] && sudo sed -i "s/auth.log/faillog/g" /etc/fail2ban/paths-common.conf
i_am_xbian && sudo sed -i "s/auth.log/faillog/g" /etc/fail2ban/paths-common.conf
# NODE activates fail2ban IN zen/ipfs_SWARM_refresh.sh
### MODIFIYING /etc/sudoers ###

View File

@ -3,6 +3,21 @@
Describe 'AstrXbian'
Describe 'install()'
Include ./include.sh
It 'should check IPFS, but not tested'
Pending "You should implement check_ipfs tests"
When call check_ipfs
The status should be success
End
It 'should check Jaklis, but not tested'
Pending "You should implement check_jaklis tests"
When call check_jaklis
The status should be success
End
It 'should check requirements, but not tested'
Pending "You should implement check_requirements tests"
When call check_requirements
The status should be success
End
It 'should be me'
When call i_am
The output should eq 'v0.4'
@ -11,13 +26,12 @@ Describe 'AstrXbian'
When call i_am_root
The status should not be success
End
It 'should install AstrXbian'
When call i_should_install
It 'should be xbian'
When call i_am_xbian
The status should be success
End
It 'should check requirements, but not tested'
Pending "You should implement check_requirements tests"
When call check_requirements
It 'should install AstrXbian'
When call i_should_install
The status should be success
End
It 'should import AstrXbian, but not tested'
@ -30,15 +44,5 @@ Describe 'AstrXbian'
When call import_kodi
The status should be success
End
It 'should check IPFS, but not tested'
Pending "You should implement check_ipfs tests"
When call check_ipfs
The status should be success
End
It 'should check Jaklis, but not tested'
Pending "You should implement check_jaklis tests"
When call check_jaklis
The status should be success
End
End
End