Skip to content

Instantly share code, notes, and snippets.

@nvgoldin
Created January 23, 2017 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nvgoldin/cceed8c443c3f8c47fb199ed631e98d0 to your computer and use it in GitHub Desktop.
Save nvgoldin/cceed8c443c3f8c47fb199ed631e98d0 to your computer and use it in GitHub Desktop.
lago api idea(integration with pytest)
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