Skip to content

Commit 381e131

Browse files
committed
validate Vagrant version
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
1 parent 579d70e commit 381e131

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_vagrant.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
from __future__ import print_function
1818
import os
19+
import re
1920
import shutil
2021
import subprocess
2122
import sys
@@ -668,6 +669,14 @@ def test_make_file_cm(test_dir):
668669
assert read_fh.read() == "one\ntwo\n"
669670

670671

672+
def test_vagrant_version():
673+
v = vagrant.Vagrant()
674+
VAGRANT_VERSION = v.version()
675+
sys.stdout.write(f"vagrant_version(): {VAGRANT_VERSION}\n")
676+
version_result = bool(re.match("^[0-9.]+$", VAGRANT_VERSION))
677+
assert version_result is True
678+
679+
671680
def _execute_command_in_vm(v, command):
672681
"""
673682
Run command via ssh on the test vagrant box. Returns a tuple of the

0 commit comments

Comments
 (0)