Skip to content

Commit 2092469

Browse files
committed
Make all cleanup method reload to return a value
1 parent 88c6d7e commit 2092469

10 files changed

Lines changed: 10 additions & 2 deletions

File tree

lib/publiccloud/azure.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ sub cleanup {
634634
$self->get_image_version() if (get_var('PUBLIC_CLOUD_BUILD'));
635635
$self->upload_boot_diagnostics();
636636
$self->SUPER::cleanup();
637+
return 1;
637638
}
638639

639640
sub query_metadata {

lib/publiccloud/ec2.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ sub cleanup {
205205
$self->upload_boot_diagnostics();
206206
$self->terraform_destroy() if ($self->terraform_applied);
207207
$self->delete_keypair();
208+
return 1;
208209
}
209210

210211
sub describe_instance {

lib/publiccloud/gce.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ sub cleanup {
199199
my ($self, $args) = @_;
200200
$self->upload_boot_diagnostics();
201201
$self->SUPER::cleanup();
202+
return 1;
202203
}
203204

204205
sub query_metadata {

lib/publiccloud/noprovider.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ sub create_ssh_key {
5858
sub cleanup {
5959
my ($self) = @_;
6060
# Do nothing with existing instance.
61+
return 1;
6162
}
6263

6364
1;

lib/publiccloud/openstack.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ sub cleanup {
101101
$self->terraform_destroy() if ($self->terraform_applied);
102102
$self->delete_keypair();
103103
$self->delete_floating_ip();
104+
return 1;
104105
}
105106

106107
1;

lib/publiccloud/openstack_client.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ sub init {
9292

9393
sub cleanup {
9494
my ($self) = @_;
95+
return 1;
9596
}
9697

9798
1;

tests/publiccloud/aws_cli.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ sub cleanup {
7979
assert_script_run "aws ec2 delete-key-pair --key-name $ssh_key";
8080
# The security group can be deleted only after the instance is terminated which takes a moment
8181
script_retry "aws ec2 delete-security-group --group-name $security_group_name", delay => 15, retry => 12;
82+
return 1;
8283
}
8384

8485
sub test_flags {
8586
return {fatal => 0, milestone => 0, always_rollback => 1};
8687
}
8788

8889
1;
89-

tests/publiccloud/azure_cli.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ sub cleanup {
7171
my $machine_name = "openqa-cli-test-vm-$job_id";
7272

7373
assert_script_run("az group delete --resource-group $resource_group --yes", 180);
74+
return 1;
7475
}
7576

7677
sub test_flags {

tests/publiccloud/img_proof.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ sub cleanup {
184184
assert_script_run('tar -zcvf img_proof_results.tar.gz img_proof_results');
185185
upload_logs('img_proof_results.tar.gz', failok => 1);
186186
}
187+
return 1;
187188
}
188189

189190
1;
@@ -198,4 +199,3 @@ public cloud module.
198199
199200
The variables DISTRI, VERSION and ARCH must correspond to the system where
200201
img-proof get installed in and not to the public cloud image.
201-

tests/publiccloud/run_ltp.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ sub cleanup {
200200
script_run("(cd /tmp/log_instance && tar -zcf $root_dir/instance_log.tar.gz *)");
201201
upload_logs("$root_dir/instance_log.tar.gz", failok => 1);
202202
}
203+
return 1;
203204
}
204205

205206
sub gen_ltp_env {

0 commit comments

Comments
 (0)