name: Script refinement & bugs fix
about: Resolve an issue
title: "Script refined to allow unit tests to run and bugs fixed"
labels: pull-request
assignees: mitch7391
AdvAir is refined to allow the running of unit tests and some bugs discovered are fixed.
Is your pull request related to a problem or a new feature? Please describe:
Problems:
The AdvAir.sh has issues related to the running of the unit tests
There are a few double calls to queryAirCon that hindered the smooth runnig of unit tests
There are some minor bugs discovered
Describe the solution you'd have implemented:
[x] Put appropriate if [ "$selfTest" = "TEST_ON" ] statements within the script and removed all double calls to queryAirCon function.to facilitate a smooth running of the unit tests.
[x] A suffix _TEST is added to all temporary and log files generated from the running of the unit tests.
[x] A few bugs, for example, inappropriate double quotes, required data not extracted from an array, etc. whatever discovered are fixed.
Do your changes pass local testing:
[x] Yes on both E-zone system and MyPlace system. Passed shellcheck and passed unit tests.
Additional context:
I have included the _TEST suffix to the temporary file name /tmp/myAirConstants.txt in the setup and GetCurrentTemperature.bats files of the unit tests to become /tmp/myAirConstants.txt_TEST. This is necessary to order to prevent any interference with the smooth running of this version of AdvAir.sh on Homebridge.
name: Script refinement & bugs fix about: Resolve an issue title: "Script refined to allow unit tests to run and bugs fixed" labels: pull-request assignees: mitch7391
AdvAir is refined to allow the running of
unit tests
and some bugs discovered are fixed.Is your pull request related to a problem or a new feature? Please describe: Problems:
unit tests
unit tests
Describe the solution you'd have implemented:
if [ "$selfTest" = "TEST_ON" ]
statements within the script and removed all double calls to queryAirCon function.to facilitate a smooth running of theunit tests
._TEST
is added to all temporary and log files generated from the running of theunit tests
.Do your changes pass local testing:
unit tests
.Additional context: I have included the
_TEST
suffix to the temporary file name/tmp/myAirConstants.txt
in thesetup
andGetCurrentTemperature.bats
files of theunit tests
to become/tmp/myAirConstants.txt_TEST
. This is necessary to order to prevent any interference with the smooth running of this version of AdvAir.sh on Homebridge.