diff --git a/awx/main/tests/functional/test_feature_flags_api.py b/awx/main/tests/functional/test_feature_flags_api.py new file mode 100644 index 000000000000..71fecd9ea908 --- /dev/null +++ b/awx/main/tests/functional/test_feature_flags_api.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +import pytest + +from awx.main.models import ( # noqa + User, +) + + +@pytest.mark.django_db +def test_feature_flags_list_endpoint(get): + bob = User.objects.create(username='bob', password='test_user', is_superuser=False) + + url = "/api/v2/feature_flags_definition/" + response = get(url, user=bob, expect=200) + assert len(response.data) == 1 diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index b5d22b1c3713..ffffa1e21a3e 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -358,6 +358,7 @@ 'ansible_base.jwt_consumer', 'ansible_base.resource_registry', 'ansible_base.rbac', + 'ansible_base.feature_flags', 'flags', ] diff --git a/requirements/requirements_git.txt b/requirements/requirements_git.txt index 07e0b8878c02..3141e8e3a5d4 100644 --- a/requirements/requirements_git.txt +++ b/requirements/requirements_git.txt @@ -1,6 +1,6 @@ git+https://github.com/ansible/system-certifi.git@devel#egg=certifi # Remove pbr from requirements.in when moving ansible-runner to requirements.in git+https://github.com/ansible/ansible-runner.git@devel#egg=ansible-runner -django-ansible-base @ git+https://github.com/ansible/django-ansible-base@devel#egg=django-ansible-base[rest-filters,jwt_consumer,resource-registry,rbac] +django-ansible-base @ git+https://github.com/zkayyali812/django-ansible-base@zk/feature-flag/api#egg=django-ansible-base[rest-filters,jwt_consumer,resource-registry,rbac,feature-flags] awx-plugins-core @ git+https://github.com/ansible/awx-plugins.git@devel#egg=awx-plugins-core awx_plugins.interfaces @ git+https://github.com/ansible/awx_plugins.interfaces.git