Commit 7e72d38
committed
Do not register 'testclass' device class outside of tests
Now that more places (especially qvm-clone and ansible) properly lists
available device classes, it's no longer harmless to include 'testclass'
on production system. There is a mechanism to replace some entry point
with another for tests (`substitute_entry_points` context manager), but
unfortunately it can't be used here, as device classes are enumerated at
the qubes.api.admin import time, not test run time (as it's the case for
storage classes). Exclude it normally, and include only if
QUBES_TEST=1 variable is set - which is done in run-tests script.
The 'testclass' devices are used only in unit tests, so it's okay
to not include them in integration tests.
Reported at QubesOS/qubes-ansible#6 (comment)1 parent a930d4e commit 7e72d38
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
0 commit comments