summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2015-02-09 12:12:19 +0100
committerTails developers <amnesia@boum.org>2015-02-09 12:12:19 +0100
commit5a80b5342680e85cbec0c5cad4bbfcc36472cd9d (patch)
tree6c1d720b363af8416b261ab09c41b0a9078086a5
parentf04b58d015ff129a5f2f61163906c121e1bcd1df (diff)
Mark VM* classes' clean_up methods private and document them.
-rw-r--r--features/support/helpers/vm_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/features/support/helpers/vm_helper.rb b/features/support/helpers/vm_helper.rb
index 5812e52..9169be4 100644
--- a/features/support/helpers/vm_helper.rb
+++ b/features/support/helpers/vm_helper.rb
@@ -14,6 +14,10 @@ class VMNet
raise e
end
+ # Used internally to clean up previous created libvirt networks with
+ # same name. We lookup by name so we also catch networks from
+ # previous test suite runs that weren't properly cleaned up
+ # (e.g. aborted).
def clean_up
begin
net = @virt.lookup_network_by_name(@net_name)
@@ -43,6 +47,8 @@ class VMNet
File.open("/sys/class/net/#{@bridge_name}/address", "rb").read.chomp
end
+ private :clean_up
+
end
@@ -72,6 +78,10 @@ class VM
@domain = @virt.define_domain_xml(xml)
end
+ # Used internally to clean up previous created libvirt domains with
+ # same name. We lookup by name so we also catch domains from
+ # previous test suite runs that weren't properly cleaned up
+ # (e.g. aborted).
def clean_up
begin
domain = @virt.lookup_domain_by_name(@domain_name)
@@ -434,4 +444,6 @@ EOF
end
end
+ private :clean_up
+
end