diff options
| author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-07-29 10:09:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-29 10:09:25 +0200 |
| commit | 7a53c6950bb7df90e2a3f4e6d0436cb5d06c3b46 (patch) | |
| tree | 8248e3edf184525d07927788bb058368666a771a /tests/functional/api | |
| parent | 8ba97aa459420ec5ae824d9299d6564656841559 (diff) | |
| parent | b46b3791707ac76d501d6b7b829d1370925fd614 (diff) | |
| download | gitlab-7a53c6950bb7df90e2a3f4e6d0436cb5d06c3b46.tar.gz | |
Merge pull request #2194 from python-gitlab/jlvillal/update-gitlab
test(functional): bump GitLab docker image to 15.2.0-ee.0
Diffstat (limited to 'tests/functional/api')
| -rw-r--r-- | tests/functional/api/test_clusters.py | 44 | ||||
| -rw-r--r-- | tests/functional/api/test_topics.py | 11 |
2 files changed, 9 insertions, 46 deletions
diff --git a/tests/functional/api/test_clusters.py b/tests/functional/api/test_clusters.py deleted file mode 100644 index 32d1488..0000000 --- a/tests/functional/api/test_clusters.py +++ /dev/null @@ -1,44 +0,0 @@ -def test_project_clusters(project): - cluster = project.clusters.create( - { - "name": "cluster1", - "platform_kubernetes_attributes": { - "api_url": "http://url", - "token": "tokenval", - }, - } - ) - clusters = project.clusters.list() - assert cluster in clusters - - cluster.platform_kubernetes_attributes = {"api_url": "http://newurl"} - cluster.save() - - cluster = project.clusters.list()[0] - assert cluster.platform_kubernetes["api_url"] == "http://newurl" - - cluster.delete() - assert cluster not in project.clusters.list() - - -def test_group_clusters(group): - cluster = group.clusters.create( - { - "name": "cluster1", - "platform_kubernetes_attributes": { - "api_url": "http://url", - "token": "tokenval", - }, - } - ) - clusters = group.clusters.list() - assert cluster in clusters - - cluster.platform_kubernetes_attributes = {"api_url": "http://newurl"} - cluster.save() - - cluster = group.clusters.list()[0] - assert cluster.platform_kubernetes["api_url"] == "http://newurl" - - cluster.delete() - assert cluster not in group.clusters.list() diff --git a/tests/functional/api/test_topics.py b/tests/functional/api/test_topics.py index 7ad71a5..0d6a3ef 100644 --- a/tests/functional/api/test_topics.py +++ b/tests/functional/api/test_topics.py @@ -4,11 +4,18 @@ https://docs.gitlab.com/ce/api/topics.html """ -def test_topics(gl): +def test_topics(gl, gitlab_version): assert not gl.topics.list() - topic = gl.topics.create({"name": "my-topic", "description": "My Topic"}) + create_dict = {"name": "my-topic", "description": "My Topic"} + if gitlab_version.major >= 15: + create_dict["title"] = "my topic title" + topic = gl.topics.create( + {"name": "my-topic", "title": "my topic title", "description": "My Topic"} + ) assert topic.name == "my-topic" + if gitlab_version.major >= 15: + assert topic.title == "my topic title" assert gl.topics.list() topic.description = "My Updated Topic" |
