-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dom0_template fixture, test_module_info, multipathd_topology
- Loading branch information
1 parent
b131ca4
commit 2ab76c7
Showing
7 changed files
with
43 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo "modinfo for $*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
echo -n "${0##*/}$*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tcp_diag 16384 0 - Live 0xffffffffc05c0000 | ||
udp_diag 16384 0 - Live 0xffffffffc059c000 | ||
inet_diag 24576 2 tcp_diag,udp_diag, Live 0xffffffffc0533000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
"""Regression tests for the bugtool helper function mdadm_arrays()""" | ||
|
||
|
||
def test_mdadm_arrays(bugtool, dom0_template): | ||
"""Assert mdadm_arrays() returning arrays of the mdadm mockup in the dom0-template""" | ||
assert list(bugtool.mdadm_arrays()) == ["/dev/md0", "/dev/md1"] | ||
|
||
|
||
def test_module_info(bugtool, dom0_template): | ||
"""Assert module_info() returning module names from mockup file in the dom0-template""" | ||
|
||
bugtool.PROC_MODULES = __file__.replace(".py", ".modules") | ||
output = bugtool.module_info(bugtool.CAP_KERNEL_INFO) | ||
assert output == "modinfo for tcp_diag\nmodinfo for udp_diag\nmodinfo for inet_diag\n" | ||
|
||
|
||
def test_multipathd_topology(bugtool, dom0_template): | ||
"""Assert multipathd_topology() returning the output of the faked multipathd tool""" | ||
assert bugtool.multipathd_topology(bugtool.CAP_MULTIPATH) == bugtool.MULTIPATHD + "-k" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters