Closed ianballou closed 6 years ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
hil/ext/switches/nexus.py | 0 | 4 | 0.0% | ||
hil/ext/switches/brocade.py | 0 | 4 | 0.0% | ||
hil/ext/switches/dell.py | 0 | 4 | 0.0% | ||
hil/ext/switches/n3000.py | 0 | 4 | 0.0% | ||
hil/ext/switches/dellnos9.py | 0 | 4 | 0.0% | ||
hil/config.py | 28 | 36 | 77.78% | ||
<!-- | Total: | 32 | 60 | 53.33% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
hil/config.py | 1 | 73.97% | ||
<!-- | Total: | 1 | --> |
Totals | |
---|---|
Change from base Build 1796: | 55.6% |
Covered Lines: | 2049 |
Relevant Lines: | 3688 |
Officially the first PR which increases the coverage 💟 🍸 🤙
I believe I addressed the comments above. @zenhack for more in-depth config checks, I've added checks for malformed web/db urls, a check for the VLAN pool list, and a check for log_level. Naved and I discussed checking the headnode config options, and we decided they can be left as str
for now since they will be removed in the future.
I considered checking log_dir
, however a bad directory crashes HIL before before the config is even loaded. I'll add an issue about that.
Tests will be on the way as soon as we lock in which config checks should be there.
Tests are in progress now.
@naved001 I addressed your questions in this commit I believe.
I've updated the functions to better use the schema library. I tried to not use lambdas, but I went with them since it seems to be a standard in the schema docs.
I also fixed up the IOError
checking. In testing, EACCES
was raised rather than EPERM
for directory permissions. In case of an unexpected error, I re-raise it so the CLI can deal with it.
Everything should be all set now.
LGTM, merging.
Addresses #45:
Note: I am going to start working on testing, but I wanted to get this out for review first since I'll be out next week.