Repository: arenadata/adcm (language: python)

Issue:
Bump ADCM config version



Discussion / hints:

Fix patch:
diff --git a/Makefile b/Makefile
index 9304e61b96..001a705eb9 100644
--- a/Makefile
+++ b/Makefile
@@ -60,12 +60,12 @@ unittests: basetests test_image ## Run unittests
 pytest: ## Run functional tests
 	docker pull hub.adsw.io/library/functest:3.8.6.slim.buster-x64
 	docker run -i --rm --shm-size=4g -v /var/run/docker.sock:/var/run/docker.sock --network=host \
-	-v $(CURDIR)/:/adcm -v ${LDAP_CONF_FILE}:${LDAP_CONF_FILE} -w /adcm/ \
+	-v $(CURDIR)/:/adcm -w /adcm/ \
 	-e BUILD_TAG=${BUILD_TAG} -e ADCMPATH=/adcm/ -e PYTHONPATH=${PYTHONPATH}:python/ \
 	-e SELENOID_HOST="${SELENOID_HOST}" -e SELENOID_PORT="${SELENOID_PORT}" \
 	hub.adsw.io/library/functest:3.8.6.slim.buster-x64 /bin/sh -e \
-	./pytest.sh -m "not full and not extra_rbac" --adcm-image='hub.adsw.io/adcm/adcm:$(subst /,_,$(BRANCH_NAME))' \
-	--ldap-conf ${LDAP_CONF_FILE}
+	./pytest.sh -m "not full and not extra_rbac and not ldap" \
+	--adcm-image='hub.adsw.io/adcm/adcm:$(subst /,_,$(BRANCH_NAME))'
 
 pytest_release: ## Run functional tests on release
 	docker pull hub.adsw.io/library/functest:3.8.6.slim.buster.firefox-x64
diff --git a/conf/adcm/config.yaml b/conf/adcm/config.yaml
index 43f3b1a33b..02d5bca818 100644
--- a/conf/adcm/config.yaml
+++ b/conf/adcm/config.yaml
@@ -2,7 +2,7 @@
 
   type: adcm
   name: ADCM
-  version: 1.8
+  version: 1.9
 
   actions:
     run_ldap_sync:


Test patch:
diff --git a/tests/functional/ldap_auth/test_access.py b/tests/functional/ldap_auth/test_access.py
index ff02072b2c..ae5c4621d0 100644
--- a/tests/functional/ldap_auth/test_access.py
+++ b/tests/functional/ldap_auth/test_access.py
@@ -26,7 +26,7 @@
 from tests.functional.ldap_auth.utils import get_ldap_user_from_adcm, get_ldap_group_from_adcm
 from tests.functional.rbac.conftest import is_denied, BusinessRoles, create_policy, is_allowed, delete_policy
 
-pytestmark = [only_clean_adcm, pytest.mark.usefixtures('configure_adcm_ldap_ad')]
+pytestmark = [only_clean_adcm, pytest.mark.usefixtures('configure_adcm_ldap_ad'), pytest.mark.ldap()]
 
 
 # pylint: disable=redefined-outer-name
diff --git a/tests/functional/ldap_auth/test_basic.py b/tests/functional/ldap_auth/test_basic.py
index 744747b3a7..22489e43c9 100644
--- a/tests/functional/ldap_auth/test_basic.py
+++ b/tests/functional/ldap_auth/test_basic.py
@@ -30,7 +30,7 @@
     login_should_fail,
 )
 
-pytestmark = [only_clean_adcm, pytest.mark.usefixtures('configure_adcm_ldap_ad')]
+pytestmark = [only_clean_adcm, pytest.mark.usefixtures('configure_adcm_ldap_ad'), pytest.mark.ldap()]
 
 
 @pytest.mark.parametrize('configure_adcm_ldap_ad', [False, True], ids=['ssl_off', 'ssl_on'], indirect=True)
diff --git a/tests/functional/ldap_auth/test_complex.py b/tests/functional/ldap_auth/test_complex.py
index 8456546b20..0f2476291b 100644
--- a/tests/functional/ldap_auth/test_complex.py
+++ b/tests/functional/ldap_auth/test_complex.py
@@ -36,6 +36,8 @@
 UserInfo = dict
 GroupInfo = dict
 
+pytestmark = [pytest.mark.ldap()]
+
 
 @pytest.fixture()
 def two_ldap_groups_with_users(ldap_ad, ldap_basic_ous) -> Tuple[GroupInfo, UserInfo, GroupInfo, UserInfo]:
diff --git a/tests/functional/ldap_auth/test_modification.py b/tests/functional/ldap_auth/test_modification.py
index cd01e86a36..ecbbf4639d 100644
--- a/tests/functional/ldap_auth/test_modification.py
+++ b/tests/functional/ldap_auth/test_modification.py
@@ -31,7 +31,7 @@
 
 # pylint: disable=redefined-outer-name
 
-pytestmark = [only_clean_adcm, pytest.mark.usefixtures('configure_adcm_ldap_ad')]
+pytestmark = [only_clean_adcm, pytest.mark.usefixtures('configure_adcm_ldap_ad'), pytest.mark.ldap()]
 
 
 @pytest.fixture()
diff --git a/tests/functional/ldap_auth/test_relations.py b/tests/functional/ldap_auth/test_relations.py
index 10e241a161..6e716e662d 100644
--- a/tests/functional/ldap_auth/test_relations.py
+++ b/tests/functional/ldap_auth/test_relations.py
@@ -22,7 +22,7 @@
 from tests.functional.ldap_auth.utils import get_ldap_user_from_adcm, get_ldap_group_from_adcm
 from tests.library.ldap_interactions import LDAPEntityManager
 
-pytestmark = [only_clean_adcm, pytest.mark.usefixtures('configure_adcm_ldap_ad')]
+pytestmark = [only_clean_adcm, pytest.mark.usefixtures('configure_adcm_ldap_ad'), pytest.mark.ldap()]
 
 
 # pylint: disable-next=too-few-public-methods
diff --git a/tests/functional/ldap_auth/test_sync.py b/tests/functional/ldap_auth/test_sync.py
index aaa92348bb..c5256a96b0 100644
--- a/tests/functional/ldap_auth/test_sync.py
+++ b/tests/functional/ldap_auth/test_sync.py
@@ -39,7 +39,7 @@
 
 # pylint: disable=redefined-outer-name
 
-pytestmark = [only_clean_adcm]
+pytestmark = [only_clean_adcm, pytest.mark.ldap()]
 
 
 @pytest.fixture()
diff --git a/tests/pytest.ini b/tests/pytest.ini
index 24034ae255..60e679096e 100644
--- a/tests/pytest.ini
+++ b/tests/pytest.ini
@@ -9,4 +9,5 @@ markers =
     regression: mark a test/module that tests known bug
     only_clean_adcm: mark a test/module to run it only with clean ADCM
     extra_rbac: mark an RBAC related test/module to exclude it from full run
+    ldap: ADCM-LDAP integration related tests
     include_firefox: test given ui test case on both Chrome and Firefox browsers
diff --git a/tests/ui_tests/test_admin_page.py b/tests/ui_tests/test_admin_page.py
index ad90cf715d..eaf1aaded7 100644
--- a/tests/ui_tests/test_admin_page.py
+++ b/tests/ui_tests/test_admin_page.py
@@ -239,7 +239,7 @@ def test_reset_config(self, settings_page: AdminSettingsPage):
             settings_page.config.reset_to_default(config_field_row)
             settings_page.config.assert_input_value_is(params['init_value'], params['field_display_name'])
 
-    # TODO add mark during ADCM-2967
+    @pytest.mark.ldap()
     def test_ldap_config(self, settings_page: AdminSettingsPage):
         """Test ldap"""
         params = {'test_action': "Test LDAP connection", 'connect_action': "Run LDAP sync", "test_value": "test"}
@@ -353,6 +353,7 @@ def test_change_admin_password(self, users_page: AdminUsersPage):
         with allure.step('Check login was successful'):
             AdminIntroPage(users_page.driver, users_page.base_url).wait_page_is_opened(timeout=5)
 
+    @pytest.mark.ldap()
     @pytest.mark.usefixtures("configure_adcm_ldap_ad")
     def test_ldap_user_change_is_forbidden(self, users_page: AdminUsersPage, ldap_user_in_group):
         """Change ldap user"""
@@ -508,6 +509,7 @@ def test_delete_group_from_groups_page(self, app_fs):
         with allure.step('Check that group has been deleted'):
             assert len(page.table.get_all_rows()) == 0, "There should be 0 groups"
 
+    @pytest.mark.ldap()
     @pytest.mark.usefixtures("configure_adcm_ldap_ad")
     def test_ldap_group_change_is_forbidden(self, app_fs, ldap_user_in_group):
         """Change ldap group"""
@@ -521,6 +523,7 @@ def test_ldap_group_change_is_forbidden(self, app_fs, ldap_user_in_group):
             ), f"Group {params['group_name']} should be in groups list"
         groups_page.check_ldap_group(params['group_name'])
 
+    @pytest.mark.ldap()
     @pytest.mark.usefixtures("configure_adcm_ldap_ad")
     def test_add_ldap_user_to_group(self, app_fs, ldap_user_in_group):
         """Add ldap user to group"""
diff --git a/tests/ui_tests/test_login_page.py b/tests/ui_tests/test_login_page.py
index f058cacbda..a6c4c1f936 100644
--- a/tests/ui_tests/test_login_page.py
+++ b/tests/ui_tests/test_login_page.py
@@ -35,6 +35,7 @@ def test_check_login_to_adcm(app_fs, adcm_credentials):
         intro_page.header.check_auth_page_elements()
 
 
+@pytest.mark.ldap()
 @including_https
 @pytest.mark.parametrize("configure_adcm_ldap_ad", [False, True], ids=["ssl-off", "ssl-on"], indirect=True)
 @pytest.mark.usefixtures("configure_adcm_ldap_ad")