| 1 |
#!/usr/bin/python3 -cimport os, sys; os.execv(os.path.dirname(sys.argv[1]) + "/../common/pywrap", sys.argv) |
| 2 |
|
| 3 |
# |
| 4 |
# Copyright (C) 2015 Red Hat, Inc. |
| 5 |
# SPDX-License-Identifier: LGPL-2.1-or-later |
| 6 |
|
| 7 |
|
| 8 |
import storagelib |
| 9 |
import testlib |
| 10 |
|
| 11 |
|
| 12 |
class TestStorageScaling(storagelib.StorageCase): |
| 13 |
|
| 14 |
def testScaling(self): |
| 15 |
m = self.machine |
| 16 |
b = self.browser |
| 17 |
|
| 18 |
self.login_and_go("/storage") |
| 19 |
|
| 20 |
def count_rows(): |
| 21 |
return b.count(self.card("Storage") + " tbody tr") |
| 22 |
|
| 23 |
b.wait_visible(self.card_row("Storage", name="/dev/vda")) |
| 24 |
# Wait on btrfs subvolumes on OS'es with the install on btrfs |
| 25 |
if m.image.startswith('fedora') or m.image == "arch": |
| 26 |
b.wait_in_text(self.card("Storage"), "lib/machines") |
| 27 |
n_rows = count_rows() |
| 28 |
|
| 29 |
m.execute("modprobe scsi_debug num_tgts=200") |
| 30 |
with b.wait_timeout(60): |
| 31 |
b.click(self.card_button("Storage", f"Show all {n_rows + 200} rows")) |
| 32 |
b.wait(lambda: count_rows() == n_rows + 200) |
| 33 |
|
| 34 |
|
| 35 |
if __name__ == '__main__': |
| 36 |
testlib.test_main() |