mirror of https://github.com/Icinga/icinga2.git
100 lines
3.8 KiB
Plaintext
Executable File
100 lines
3.8 KiB
Plaintext
Executable File
{
|
|
"commands": {
|
|
"copy": "scp -qF ssh_config {0} default:{1}",
|
|
"exec": "ssh -F ssh_config default '{0}'",
|
|
"clean": "ssh -F ssh_config default 'rm -f {0}'"
|
|
},
|
|
"settings": {
|
|
"test_root": "/tmp"
|
|
},
|
|
"setups": {
|
|
"^ido_[a-z]{2}sql.test$": {
|
|
"setup": {
|
|
"copy": [
|
|
"files/ido_tests.py >> /tmp/ido_tests.py",
|
|
"files/utils.py >> /tmp/utils.py"
|
|
]
|
|
},
|
|
"teardown": {
|
|
"clean": [
|
|
"/tmp/ido_tests.py*",
|
|
"/tmp/utils.py*"
|
|
]
|
|
}
|
|
},
|
|
"checkresult.test": {
|
|
"setup": {
|
|
"copy": [
|
|
"files/configs/checkresult.conf >> /tmp/checkresult.conf",
|
|
"files/wait_for_ido.sh >> /tmp/wait_for_ido.sh",
|
|
"files/utils.py >> /tmp/utils.py"
|
|
],
|
|
"exec": [
|
|
"sudo mv /tmp/checkresult.conf /etc/icinga2/conf.d/",
|
|
"mkdir -p -m 0777 /tmp/icinga2/checkresults",
|
|
"sudo service icinga2 restart",
|
|
"/tmp/wait_for_ido.sh mysql"
|
|
]
|
|
},
|
|
"teardown": {
|
|
"clean": ["/tmp/utils.py*"],
|
|
"exec": [
|
|
"sudo rm /etc/icinga2/conf.d/checkresult.conf",
|
|
"sudo service icinga2 restart",
|
|
"rmdir /tmp/icinga2/checkresults",
|
|
"/tmp/wait_for_ido.sh mysql",
|
|
"/tmp/wait_for_ido.sh pgsql && rm /tmp/wait_for_ido.sh"
|
|
]
|
|
}
|
|
},
|
|
"external_commands.test": {
|
|
"setup": {
|
|
"copy": [
|
|
"files/utils.py >> /tmp/utils.py",
|
|
"files/configs/notifications.conf >> /tmp/no_spam.conf",
|
|
"files/configs/ido_checkresults.conf >> /tmp/ido_checkresults.conf",
|
|
"files/configs/groups.conf >> /tmp/groups.conf"
|
|
],
|
|
"exec": [
|
|
"sudo mv /etc/icinga2/conf.d/generic-service.conf /etc/icinga2/conf.d/generic-service.conf.bak",
|
|
"sudo mv /etc/icinga2/conf.d/groups.conf /etc/icinga2/conf.d/groups.conf.bak",
|
|
"sudo mv /tmp/groups.conf /etc/icinga2/conf.d/",
|
|
"sudo mv /tmp/ido_checkresults.conf /etc/icinga2/conf.d/",
|
|
"sudo mv /tmp/no_spam.conf /etc/icinga2/conf.d/",
|
|
"sudo service icinga2 restart"
|
|
]
|
|
},
|
|
"teardown": {
|
|
"clean": ["/tmp/utils.py*"],
|
|
"exec": [
|
|
"sudo rm /etc/icinga2/conf.d/groups.conf",
|
|
"sudo mv /etc/icinga2/conf.d/groups.conf.bak /etc/icinga2/conf.d/groups.conf",
|
|
"sudo mv /etc/icinga2/conf.d/generic-service.conf.bak /etc/icinga2/conf.d/generic-service.conf",
|
|
"sudo rm /etc/icinga2/conf.d/ido_checkresults.conf",
|
|
"sudo rm /etc/icinga2/conf.d/no_spam.conf",
|
|
"sudo service icinga2 restart"
|
|
]
|
|
}
|
|
},
|
|
"eventhandler.test": {
|
|
"setup": {
|
|
"copy": [
|
|
"files/utils.py >> /tmp/utils.py",
|
|
"files/configs/eventhandler.conf >> /tmp/eventhandler.conf"
|
|
],
|
|
"exec": [
|
|
"sudo mv /tmp/eventhandler.conf /etc/icinga2/conf.d/",
|
|
"sudo service icinga2 restart"
|
|
]
|
|
},
|
|
"teardown": {
|
|
"clean": ["/tmp/utils.py*"],
|
|
"exec": [
|
|
"sudo rm /etc/icinga2/conf.d/eventhandler.conf",
|
|
"sudo service icinga2 restart"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|