From 17f4d1c0fdadae92d59b2e11f2d96eb059ba0c3c Mon Sep 17 00:00:00 2001
From: Yves Noirjean <yves.noirjean@id.ethz.ch>
Date: Fri, 6 Jul 2018 13:22:11 +0200
Subject: [PATCH] obis: fixed integration tests

---
 .../integration_tests/integration_tests.py    | 24 +++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/obis/src/python/integration_tests/integration_tests.py b/obis/src/python/integration_tests/integration_tests.py
index 540a467e9bc..7152493bb4e 100644
--- a/obis/src/python/integration_tests/integration_tests.py
+++ b/obis/src/python/integration_tests/integration_tests.py
@@ -306,6 +306,18 @@ def test_obis(tmpdir):
             cmd('obis repository clear')
             assert get_settings()['repository'] == {'id': None, 'external_dms_id': None, 'data_set_id': None}
 
+        output_buffer = '=================== 22. changing identifier ===================\n'
+        settings = create_repository_and_commit(tmpdir, o, 'data14', '/DEFAULT/BIGDATA2')
+        move_sample(o, settings['object']['permId'], 'BIGDATA')
+        try:
+            settings = commit_new_change(tmpdir, o, 'data14')
+            assert settings['object']['id'] == '/BIGDATA/BIGDATA2'
+        finally:
+            move_sample(o, settings['object']['permId'], 'DEFAULT')
+        with cd('data14'): assert get_settings()['object']['permId'] is not None
+        cmd('obis object set id=/DEFAULT/DEFAULT')
+        with cd('data14'): assert get_settings()['object']['permId'] is not None
+
         output_buffer = '=================== 16. User switch ===================\n'
         cmd('obis init data9')
         with cd('data9'):
@@ -324,18 +336,6 @@ def test_obis(tmpdir):
                 timeout = True
             assert timeout == True
 
-        output_buffer = '=================== 22. changing identifier ===================\n'
-        settings = create_repository_and_commit(tmpdir, o, 'data14', '/DEFAULT/BIGDATA2')
-        move_sample(o, settings['object']['permId'], 'BIGDATA')
-        try:
-            settings = commit_new_change(tmpdir, o, 'data14')
-            assert settings['object']['id'] == '/BIGDATA/BIGDATA2'
-        finally:
-            move_sample(o, settings['object']['permId'], 'DEFAULT')
-        with cd('data14'): assert get_settings()['object']['permId'] is not None
-        cmd('obis object set id=/DEFAULT/DEFAULT')
-        with cd('data14'): assert get_settings()['object']['permId'] is not None
-
 
 def assert_file_paths(files, expected_paths):
     paths = list(map(lambda file: file['path'], files))
-- 
GitLab