Skip to content

Commit c40d8ca

Browse files
committed
Update updater tests
Mockups in core-admin-client got fixed default-dvm (it's properly AppVM now), and also new test-disp (a DispVM). This means there is one more AppVM, and the total number of VMs also increased. Adjust tests for this situation. This change is related to 9c32984 "Late GUID for preloaded disposables" commit in core-admin-client.
1 parent 3a85bee commit c40d8ca

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

qui/updater/tests/test_intro_page.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ def test_populate_vm_list(
6969
@pytest.mark.parametrize(
7070
"updates_available, expectations",
7171
(
72-
pytest.param((2, 6), (0, 2, 6, 13, 0)),
73-
pytest.param((6, 0), (0, 6, 13, 0)),
72+
pytest.param((2, 6), (0, 2, 6, 14, 0)),
73+
pytest.param((6, 0), (0, 6, 14, 0)),
7474
),
7575
)
7676
def test_on_header_toggled(
@@ -90,7 +90,7 @@ def test_on_header_toggled(
9090
for vm in test_qapp.domains:
9191
sut.list_store.append_vm(vm)
9292

93-
assert len(sut.list_store) == 13
93+
assert len(sut.list_store) == 14
9494

9595
for i, row in enumerate(sut.list_store):
9696
if i < updates_available[0]:
@@ -109,9 +109,9 @@ def test_on_header_toggled(
109109
assert selected_num == expected
110110
assert (
111111
sut.checkbox_column_button.get_inconsistent()
112-
and expected not in (0, 13)
112+
and expected not in (0, 14)
113113
or sut.checkbox_column_button.get_active()
114-
and expected == 13
114+
and expected == 14
115115
or not sut.checkbox_column_button.get_active()
116116
and expected == 0
117117
)
@@ -130,7 +130,7 @@ def test_on_checkbox_toggled(
130130
for vm in test_qapp.domains:
131131
sut.list_store.append_vm(vm)
132132

133-
assert len(sut.list_store) == 13
133+
assert len(sut.list_store) == 14
134134

135135
sut.head_checkbox.state = HeaderCheckbox.NONE
136136
sut.head_checkbox.set_buttons()
@@ -188,7 +188,7 @@ def test_prohibit_start(
188188
for vm in test_qapp.domains:
189189
sut.list_store.append_vm(vm)
190190

191-
assert len(sut.list_store) == 13
191+
assert len(sut.list_store) == 14
192192

193193
sut.head_checkbox.state = HeaderCheckbox.NONE
194194
sut.head_checkbox.set_buttons()
@@ -422,7 +422,7 @@ def test_select_rows_ignoring_conditions(
422422
for vm in test_qapp.domains:
423423
sut.list_store.append_vm(vm)
424424

425-
assert len(sut.list_store) == 13
425+
assert len(sut.list_store) == 14
426426

427427
result = b""
428428
if tmpls_and_stndas:

qui/updater/tests/test_summary_page.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_on_header_toggled(
9696
sut.head_checkbox._allowed[0] = AppVMType.SERVICEVM
9797
service_num = 3
9898
sut.head_checkbox._allowed[1] = AppVMType.NON_SERVICEVM
99-
non_excluded_num = 7
99+
non_excluded_num = 8
100100

101101
sut.head_checkbox.state = HeaderCheckbox.NONE
102102

@@ -378,6 +378,7 @@ def test_perform_restart(
378378
"sys-firewall",
379379
"sys-net",
380380
"sys-usb",
381+
"default-dvm",
381382
"test-blue",
382383
"test-red",
383384
"test-vm",

0 commit comments

Comments
 (0)