diff --git a/features/apt_messages.feature b/features/apt_messages.feature index 35d47b8da1..0490b0bec7 100644 --- a/features/apt_messages.feature +++ b/features/apt_messages.feature @@ -720,7 +720,9 @@ Feature: APT Messages ] } """ - When I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds When I apt upgrade Then I will see the following on stdout """ @@ -747,7 +749,9 @@ Feature: APT Messages ] } """ - When I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds When I apt upgrade Then I will see the following on stdout """ @@ -779,7 +783,9 @@ Feature: APT Messages ] } """ - When I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds When I apt upgrade Then I will see the following on stdout: """ @@ -810,7 +816,9 @@ Feature: APT Messages ] } """ - When I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds When I apt upgrade Then I will see the following on stdout: """ @@ -837,7 +845,9 @@ Feature: APT Messages ] } """ - When I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds When I apt upgrade Then I will see the following on stdout: """ @@ -871,7 +881,9 @@ Feature: APT Messages ] } """ - And I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds And I apt upgrade Then I will see the following on stdout: """ @@ -901,7 +913,9 @@ Feature: APT Messages """ And I apt install `=` And I run `apt-mark hold ` with sudo - And I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds And I apt upgrade Then stdout contains substring: """ @@ -927,7 +941,9 @@ Feature: APT Messages ] } """ - And I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds And I apt upgrade Then stdout contains substring: """ @@ -955,7 +971,9 @@ Feature: APT Messages ] } """ - And I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds And I apt upgrade Then stdout contains substring: """ @@ -985,7 +1003,9 @@ Feature: APT Messages ] } """ - And I run `pro refresh messages` with sudo + When I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + When I run `systemctl start apt-news.service` with sudo + When I wait `5` seconds And I apt upgrade Then stdout contains substring: """ @@ -1014,7 +1034,9 @@ Feature: APT Messages ] } """ - And I run `pro refresh messages` with sudo + And I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + And I run `systemctl start apt-news.service` with sudo + And I wait `5` seconds And I apt upgrade Then I will see the following on stdout: """ @@ -1045,7 +1067,9 @@ Feature: APT Messages ] } """ - And I run `pro refresh messages` with sudo + And I run `rm -rf /var/lib/apt/periodic/update-success-stamp` with sudo + And I run `systemctl start apt-news.service` with sudo + And I wait `5` seconds And I apt upgrade Then I will see the following on stdout: """ diff --git a/features/steps/machines.py b/features/steps/machines.py index b1aedbf320..b2cdb45c13 100644 --- a/features/steps/machines.py +++ b/features/steps/machines.py @@ -107,6 +107,13 @@ def given_a_machine( machine_name=machine_name, ) + when_i_run_command( + context, + "systemctl mask apt-news.service", + "with sudo", + machine_name=machine_name, + ) + # make sure the machine has up-to-date apt data when_i_apt_update(context, machine_name=machine_name) @@ -116,6 +123,13 @@ def given_a_machine( context, "python3-coverage", machine_name=machine_name ) + when_i_run_command( + context, + "systemctl unmask apt-news.service", + "with sudo", + machine_name=machine_name, + ) + if cleanup: def cleanup_instance(): @@ -232,9 +246,20 @@ def given_a_sut_machine(context, series, machine_type): ) else: given_a_machine(context, series, machine_type=machine_type) + when_i_run_command( + context, + "systemctl mask apt-news.service", + "with sudo", + ) _update_distro_info_data(context) when_i_install_uat(context) + when_i_run_command( + context, + "systemctl unmask apt-news.service", + "with sudo", + ) + # trigger GH: #3137 on all machines when_i_run_command( context,