summaryrefslogtreecommitdiffstats
path: root/features
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-02-15 07:12:23 +0000
committerintrigeri <intrigeri@boum.org>2019-02-15 07:12:23 +0000
commit4f6b0687410b5e0bc051958a594aac96ecb430e1 (patch)
treea9d580b8082a5eed332917bb2d71aa35602b9f9d /features
parent774fdc56ee275c8e262475ab1f3a4ab3e4ebea7d (diff)
Test suite (refactoring): extract code to function.
I'll need this to make the tests added for #16461 run only on new enough Tails.
Diffstat (limited to 'features')
-rw-r--r--features/step_definitions/common_steps.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index 3fdee9c..572cd1a 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -953,8 +953,12 @@ Given /^Tails is fooled to think it is running version (.+)$/ do |version|
)
end
+def running_tails_version
+ $vm.execute_successfully('tails-version').stdout.split.first
+end
+
Then /^Tails is running version (.+)$/ do |version|
- v1 = $vm.execute_successfully('tails-version').stdout.split.first
+ v1 = running_tails_version
assert_equal(version, v1, "The version doesn't match tails-version's output")
v2 = $vm.file_content('/etc/os-release')
.scan(/TAILS_VERSION_ID="(#{version})"/).flatten.first