Created
January 23, 2017 13:37
-
-
Save nvgoldin/cceed8c443c3f8c47fb199ed631e98d0 to your computer and use it in GitHub Desktop.
lago api idea(integration with pytest)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lago | |
from pytest import fixture | |
@fixture(scope="module") | |
def prefix(): | |
prefix = lago.api.init(conf='../LagoInitFile') | |
prefix.start() | |
yield prefix | |
prefix.destroy() | |
@fixture | |
def vm01(prefix): | |
return prefix.virt_env.get_vm('vm01') | |
def test_vm01_hostname(vm01): | |
assert vm01.ssh(['hostname']) == 'vm01.test' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment