Skip to content

Commit

Permalink
Use loaded repositories from the session object when present
Browse files Browse the repository at this point in the history
Signed-off-by: Vinzenz Feenstra <[email protected]>
  • Loading branch information
vinzenz committed Nov 16, 2018
1 parent 3cbc443 commit 129b7be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions leapp/snactor/fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,13 @@ def my_repository_library_test(loaded_leapp_repository):
os.environ['LEAPP_HOSTNAME'] = socket.getfqdn()
context = str(uuid.uuid4())
with get_connection(None):
Execution(context=str(uuid.uuid4()), kind='snactor-test-run', configuration='').store()
Execution(context=context, kind='snactor-test-run', configuration='').store()
os.environ["LEAPP_EXECUTION_ID"] = context

manager = find_and_scan_repositories(repository_path, include_locals=True)
manager.load(resolve=True)
manager = getattr(request.session, 'leapp_repository', None)
if not manager:
manager = find_and_scan_repositories(repository_path, include_locals=True)
manager.load(resolve=True)
yield manager


Expand Down

0 comments on commit 129b7be

Please sign in to comment.