• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

xml/H16-Jan-2021-9,2398,522

READMEH A D16-Jan-20212.5 KiB6449

__init__.pyH A D16-Jan-20210 10

test_boot.pyH A D16-Jan-2021804 3125

test_delayed.pyH A D16-Jan-2021618 2419

test_global_settings.pyH A D16-Jan-2021683 2419

test_languages.pyH A D16-Jan-2021213 116

test_logs.pyH A D16-Jan-2021344 1611

test_network_settings.pyH A D16-Jan-2021695 2216

test_requests.pyH A D16-Jan-20212.3 KiB6151

test_responses.pyH A D16-Jan-20212.1 KiB5547

test_snmp.pyH A D16-Jan-2021669 2115

test_uid.pyH A D16-Jan-2021435 1813

test_users.pyH A D16-Jan-20212.5 KiB5747

utils.pyH A D16-Jan-20213.1 KiB8674

README

1Testsuite for python-hpilo
2--------------------------
3
4This testsuite consists of two parts:
5- Tests for the XML generator and parser
6- Tests that actually contact iLO's
7
8The former use a corpus of known data, they're safe to run and run pretty
9quickly. The latter will change data on iLO's (and do their best to restore
10the data to previous values), will reset iLO's and take a long time to run.
11
12Test contributions wanted!
13--------------------------
14For the corpus of test data, we need more people to submit data from their
15machines. This process is safe (no iLO data is changed at all), though can
16leak information about your systems if you are not careful. If you want to
17contribute, please do the following:
18
19$ cd tests/xml
20$ ./fetch_responses hostname-of-your-ilo-here
21
22This creates a new directory named after the hardware model, ilo model and ilo
23firmware of your machine. In it, you find raw and parsed responses of all
24python-hpilo queries. You should inspect this data and see if it's correct.
25You should also redact information you do not wish to share, but please don't
26go overboard.
27
28- Redacting iLO license keys makes perfect sense.
29- Redacting hostnames and IP addresses is acceptable, but please do not redact
30  anything else
31- When redacting, replace each letter of the redacted string with an x. Don't
32  add or remove characters
33- The .raw files may contain http chunked data, be very careful when editing
34  this and don't break the format. Preferably use a hex editor, or an editor
35  that does not mess with newlines (vim will do)
36
37You can either send me your datafiles via e-mail, or send a pull request on
38GitHub. If you do not know how to redact the data, or want me to do it for
39you, please send the data by e-mail and I will redact hostnames and iLO
40license keys.
41
42Running the tests
43-----------------
44Running the safe tests is as simple as running:
45
46$ python -munittest tests.test_requests
47$ python -munittest tests.test_responses
48
49You can run any of the tests this way, just replace test_requests with the
50name of the test. To run all tests, you can use:
51
52$ python -munittest discover
53
54However, if you run this without configuring the tests, you'll notice that
55nothing actually attempts to contact an iLO. You will need to tell it which
56iLOs to test. You do this in ~/.ilo.conf by adding test sections like the
57following:
58
59[test test-server]
60hostname = test-server.ilo.example.com
61
62Please don't run these tests on mission-critical servers. While they try very
63hard to restore the settings it changes, bugs and errors happen.
64