Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Arlt <parlt@suse.com>
  • Loading branch information
parlt91 committed Aug 16, 2023
1 parent 688b228 commit 8f4e635
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void testSerializeSystemEventDetailDto() {
dto.setHistoryType(ActionFactory.TYPE_HARDWARE_REFRESH_LIST.getLabel());
dto.setHistoryTypeName(ActionFactory.TYPE_HARDWARE_REFRESH_LIST.getName());
dto.setHistoryStatus(ActionFactory.STATUS_COMPLETED.getName());
dto.setSummary("Hardware List Refresh scheduled by (none)");
dto.setSummary("Hardware List Refresh scheduled by (system)");
dto.setCreated(Date.from(LocalDateTime.of(2021, 10, 5, 16, 55)
.atZone(ZoneOffset.systemDefault())
.toInstant()));
Expand Down Expand Up @@ -81,7 +81,7 @@ public void testSerializeSystemEventDetailDto() {
assertTrue(xml.contains("<string>Completed</string>"));

assertTrue(xml.contains("<name>summary</name>"));
assertTrue(xml.contains("<string>Hardware List Refresh scheduled by (none)</string>"));
assertTrue(xml.contains("<string>Hardware List Refresh scheduled by (system)</string>"));

assertTrue(xml.contains("<name>created</name>"));
assertTrue(xml.contains("<dateTime.iso8601>20211005T16:55:00</dateTime.iso8601>"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void testSerializeSystemEventDto() {
dto.setHistoryType(ActionFactory.TYPE_HARDWARE_REFRESH_LIST.getLabel());
dto.setHistoryTypeName(ActionFactory.TYPE_HARDWARE_REFRESH_LIST.getName());
dto.setHistoryStatus(ActionFactory.STATUS_COMPLETED.getName());
dto.setSummary("Hardware List Refresh scheduled by (none)");
dto.setSummary("Hardware List Refresh scheduled by (system)");
dto.setCompleted(Date.from(LocalDateTime.of(2021, 10, 5, 17, 0)
.atZone(ZoneOffset.systemDefault())
.toInstant()));
Expand All @@ -65,7 +65,7 @@ public void testSerializeSystemEventDto() {
assertTrue(xml.contains("<string>Completed</string>"));

assertTrue(xml.contains("<name>summary</name>"));
assertTrue(xml.contains("<string>Hardware List Refresh scheduled by (none)</string>"));
assertTrue(xml.contains("<string>Hardware List Refresh scheduled by (system)</string>"));

assertTrue(xml.contains("<name>completed</name>"));
assertTrue(xml.contains("<dateTime.iso8601>20211005T17:00:00</dateTime.iso8601>"));
Expand Down
8 changes: 4 additions & 4 deletions spacecmd/tests/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def test_do_system_listeventhistory_output(self, shell):
shell.help_system_listeventhistory = MagicMock()
shell.client.system.getEventHistory = MagicMock(return_value=[{
"id": 3, "history_type": "Apply states", "status": "Completed",
"summary": "Apply states [certs, channels] scheduled by (none)", "completed": "20211015T16:56:27",
"summary": "Apply states [certs, channels] scheduled by (system)", "completed": "20211015T16:56:27",
}, {
"id": 1, "history_type": "History Event", "status": "(n/a)",
"summary": "added system entitlement", "completed": "20211015T16:56:14",
Expand All @@ -302,7 +302,7 @@ def test_do_system_listeventhistory_output(self, shell):
'Id: 3',
'History type: Apply states',
'Status: Completed',
'Summary: Apply states [certs, channels] scheduled by (none)',
'Summary: Apply states [certs, channels] scheduled by (system)',
'Completed: 20211015T16:56:27',
'',
'Id: 1',
Expand Down Expand Up @@ -422,7 +422,7 @@ def test_do_system_event_details_action_output(self, shell):
shell.get_system_id = MagicMock(side_effect=[1000010000])
shell.client.system.getEventDetails = MagicMock(return_value={
"id": 1, "history_type": "Apply states", "status": "Completed",
"summary": "Apply states [certs] scheduled by (none)",
"summary": "Apply states [certs] scheduled by (system)",
"created": "20211005T09:47:53", "picked_up": "20211005T09:48:03",
"completed": "20211005T09:48:18", "earliest_action": "20211005T09:47:53",
"result_msg": "Successfully applied state(s): [certs]",
Expand Down Expand Up @@ -460,7 +460,7 @@ def test_do_system_event_details_action_output(self, shell):
'',
'History type: Apply states',
'Status: Completed',
'Summary: Apply states [certs] scheduled by (none)',
'Summary: Apply states [certs] scheduled by (system)',
'',
'Created: 20211005T09:47:53',
'Picked up: 20211005T09:48:03',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Feature: Setup Uyuni for Retail branch network
Scenario: Disable repositories after installing branch services
When I disable repositories after installing branch server
# WORKAROUND: the following event fails because the proxy needs 10 minutes to become responsive again
# And I wait until event "Package List Refresh scheduled by (none)" is completed
# And I wait until event "Package List Refresh scheduled by (system)" is completed
And I wait for "700" seconds

@proxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ Feature: PXE boot a Retail terminal
When I wait until I see the name of "pxeboot_minion", refreshing the page
And I follow this "pxeboot_minion" link
# Workaround: Increase timeout temporarily get rid of timeout issues
And I wait at most 350 seconds until event "Apply states [saltboot] scheduled by (none)" is completed
And I wait at most 350 seconds until event "Apply states [saltboot] scheduled by (system)" is completed
And I follow "Software" in the content area
And I follow "Software Channels" in the content area
And I wait until radio button "SLE-Product-SLES15-SP4-Pool for x86_64" is checked, refreshing the page
And I wait until event "Package List Refresh scheduled by (none)" is completed
And I wait until event "Package List Refresh scheduled by (system)" is completed
Then "pxeboot_minion" should have been reformatted

Scenario: Check connection from terminal to branch server
Expand Down

0 comments on commit 8f4e635

Please sign in to comment.