From 79922d03a2067ef58bf9063e51301b08fc0ed849 Mon Sep 17 00:00:00 2001
From: Yves Noirjean <yves.noirjean@id.ethz.ch>
Date: Fri, 23 Mar 2018 14:03:24 +0100
Subject: [PATCH] obis: integration tests login using pybis to ensure active
 session

---
 src/python/OBis/integration_tests/integration_tests.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/python/OBis/integration_tests/integration_tests.py b/src/python/OBis/integration_tests/integration_tests.py
index ecc169c6478..3cfa87ae147 100644
--- a/src/python/OBis/integration_tests/integration_tests.py
+++ b/src/python/OBis/integration_tests/integration_tests.py
@@ -4,6 +4,7 @@
 import json
 import subprocess
 import socket
+from pybis import Openbis
 
 
 def run(cmd, tmpdir="", params=[]):
@@ -19,6 +20,10 @@ def run(cmd, tmpdir="", params=[]):
 
 
 def test_obis(tmpdir):
+    # 0. pybis login
+    o = Openbis('https://localhost:8443', verify_certificates=False)
+    o.login('admin', 'admin', save_token=True)
+
     # 1. Global configuration
     result = run('./01_global_config.sh', tmpdir)
     config = json.loads(run('./00_get_config_global.sh'))
-- 
GitLab