Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Commit

Permalink
Create fixture for keystone auth tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zenhack committed Jun 23, 2016
1 parent d6f8c0d commit 0708a3e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/integration/keystone.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""Tests for the keystone auth backend."""
import pytest
import haas
import signal
from os.path import join, dirname
from subprocess import Popen


@pytest.yield_fixture()
def run_keystone():
"""Launch keystone for the duration of the test."""
script = join(dirname(haas.__file__),
'..',
'ci/keystone/keystone.sh')
proc = Popen([script, 'run'])
yield
proc.terminate()
status = proc.wait()
assert status == -signal.SIGTERM, \
"Keystone exited for some reason other than us stopping it!"


def test_dummy(run_keystone):
pass

0 comments on commit 0708a3e

Please sign in to comment.