diff --git a/tests/api_resources/environment_automations/test_task_executions.py b/tests/api_resources/environment_automations/test_task_executions.py index 271d1b6..1d40c2a 100644 --- a/tests/api_resources/environment_automations/test_task_executions.py +++ b/tests/api_resources/environment_automations/test_task_executions.py @@ -122,22 +122,10 @@ def test_method_create_list_with_all_params(self, client: Gitpod) -> None: task_execution = client.environment_automations.task_executions.create_list( connect_protocol_version=1, filter={ - "environment_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "phases": [ - "TASK_EXECUTION_PHASE_UNSPECIFIED", - "TASK_EXECUTION_PHASE_PENDING", - "TASK_EXECUTION_PHASE_RUNNING", - ], - "task_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "task_references": ["string", "string", "string"], + "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "phases": ["TASK_EXECUTION_PHASE_UNSPECIFIED"], + "task_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "task_references": ["string"], }, pagination={ "token": "token", @@ -271,17 +259,7 @@ def test_method_update_task_execution_status_with_all_params(self, client: Gitpo "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "failure_message": "failureMessage", "phase": "TASK_EXECUTION_PHASE_UNSPECIFIED", - }, - { - "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "failure_message": "failureMessage", - "phase": "TASK_EXECUTION_PHASE_UNSPECIFIED", - }, - { - "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "failure_message": "failureMessage", - "phase": "TASK_EXECUTION_PHASE_UNSPECIFIED", - }, + } ], }, connect_protocol_version=1, @@ -419,22 +397,10 @@ async def test_method_create_list_with_all_params(self, async_client: AsyncGitpo task_execution = await async_client.environment_automations.task_executions.create_list( connect_protocol_version=1, filter={ - "environment_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "phases": [ - "TASK_EXECUTION_PHASE_UNSPECIFIED", - "TASK_EXECUTION_PHASE_PENDING", - "TASK_EXECUTION_PHASE_RUNNING", - ], - "task_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "task_references": ["string", "string", "string"], + "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "phases": ["TASK_EXECUTION_PHASE_UNSPECIFIED"], + "task_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "task_references": ["string"], }, pagination={ "token": "token", @@ -568,17 +534,7 @@ async def test_method_update_task_execution_status_with_all_params(self, async_c "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "failure_message": "failureMessage", "phase": "TASK_EXECUTION_PHASE_UNSPECIFIED", - }, - { - "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "failure_message": "failureMessage", - "phase": "TASK_EXECUTION_PHASE_UNSPECIFIED", - }, - { - "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "failure_message": "failureMessage", - "phase": "TASK_EXECUTION_PHASE_UNSPECIFIED", - }, + } ], }, connect_protocol_version=1, diff --git a/tests/api_resources/environment_automations/test_tasks.py b/tests/api_resources/environment_automations/test_tasks.py index 843f007..804d10a 100644 --- a/tests/api_resources/environment_automations/test_tasks.py +++ b/tests/api_resources/environment_automations/test_tasks.py @@ -33,11 +33,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: task = client.environment_automations.tasks.update( connect_protocol_version=1, id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - depends_on=[ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + depends_on=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], metadata={}, spec={}, connect_timeout_ms=0, @@ -164,17 +160,9 @@ def test_method_create_list_with_all_params(self, client: Gitpod) -> None: task = client.environment_automations.tasks.create_list( connect_protocol_version=1, filter={ - "environment_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "references": ["x", "x", "x"], - "task_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "references": ["x"], + "task_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], }, pagination={ "token": "token", @@ -264,11 +252,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> task = await async_client.environment_automations.tasks.update( connect_protocol_version=1, id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - depends_on=[ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + depends_on=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], metadata={}, spec={}, connect_timeout_ms=0, @@ -395,17 +379,9 @@ async def test_method_create_list_with_all_params(self, async_client: AsyncGitpo task = await async_client.environment_automations.tasks.create_list( connect_protocol_version=1, filter={ - "environment_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "references": ["x", "x", "x"], - "task_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "references": ["x"], + "task_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], }, pagination={ "token": "token", diff --git a/tests/api_resources/runner_interactions/test_environments.py b/tests/api_resources/runner_interactions/test_environments.py index 1f03bf4..aa13dda 100644 --- a/tests/api_resources/runner_interactions/test_environments.py +++ b/tests/api_resources/runner_interactions/test_environments.py @@ -72,11 +72,7 @@ def test_method_list(self, client: Gitpod) -> None: def test_method_list_with_all_params(self, client: Gitpod) -> None: environment = client.runner_interactions.environments.list( connect_protocol_version=1, - environment_ids=[ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + environment_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], pagination={ "token": "token", "page_size": 0, @@ -140,21 +136,13 @@ def test_method_update_status_with_all_params(self, client: Gitpod) -> None: { "change_type": "CHANGE_TYPE_UNSPECIFIED", "path": "path", - }, - { - "change_type": "CHANGE_TYPE_UNSPECIFIED", - "path": "path", - }, - { - "change_type": "CHANGE_TYPE_UNSPECIFIED", - "path": "path", - }, + } ], "clone_url": "cloneUrl", "latest_commit": "latestCommit", "total_changed_files": 0, "total_unpushed_commits": 0, - "unpushed_commits": ["string", "string", "string"], + "unpushed_commits": ["string"], }, "phase": "CONTENT_PHASE_UNSPECIFIED", "session": "session", @@ -180,19 +168,11 @@ def test_method_update_status_with_all_params(self, client: Gitpod) -> None: { "port": 1, "url": "url", - }, - { - "port": 1, - "url": "url", - }, - { - "port": 1, - "url": "url", - }, + } ], "ssh": {"url": "url"}, }, - "failure_message": ["string", "string", "string"], + "failure_message": ["string"], "machine": { "failure_message": "failureMessage", "phase": "PHASE_UNSPECIFIED", @@ -216,36 +196,16 @@ def test_method_update_status_with_all_params(self, client: Gitpod) -> None: "phase": "CONTENT_PHASE_UNSPECIFIED", "secret_name": "secretName", "warning_message": "warningMessage", - }, - { - "failure_message": "failureMessage", - "phase": "CONTENT_PHASE_UNSPECIFIED", - "secret_name": "secretName", - "warning_message": "warningMessage", - }, - { - "failure_message": "failureMessage", - "phase": "CONTENT_PHASE_UNSPECIFIED", - "secret_name": "secretName", - "warning_message": "warningMessage", - }, + } ], "ssh_public_keys": [ { "id": "id", "phase": "CONTENT_PHASE_UNSPECIFIED", - }, - { - "id": "id", - "phase": "CONTENT_PHASE_UNSPECIFIED", - }, - { - "id": "id", - "phase": "CONTENT_PHASE_UNSPECIFIED", - }, + } ], "status_version": "string", - "warning_message": ["string", "string", "string"], + "warning_message": ["string"], }, connect_timeout_ms=0, ) @@ -331,11 +291,7 @@ async def test_method_list(self, async_client: AsyncGitpod) -> None: async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: environment = await async_client.runner_interactions.environments.list( connect_protocol_version=1, - environment_ids=[ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + environment_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], pagination={ "token": "token", "page_size": 0, @@ -399,21 +355,13 @@ async def test_method_update_status_with_all_params(self, async_client: AsyncGit { "change_type": "CHANGE_TYPE_UNSPECIFIED", "path": "path", - }, - { - "change_type": "CHANGE_TYPE_UNSPECIFIED", - "path": "path", - }, - { - "change_type": "CHANGE_TYPE_UNSPECIFIED", - "path": "path", - }, + } ], "clone_url": "cloneUrl", "latest_commit": "latestCommit", "total_changed_files": 0, "total_unpushed_commits": 0, - "unpushed_commits": ["string", "string", "string"], + "unpushed_commits": ["string"], }, "phase": "CONTENT_PHASE_UNSPECIFIED", "session": "session", @@ -439,19 +387,11 @@ async def test_method_update_status_with_all_params(self, async_client: AsyncGit { "port": 1, "url": "url", - }, - { - "port": 1, - "url": "url", - }, - { - "port": 1, - "url": "url", - }, + } ], "ssh": {"url": "url"}, }, - "failure_message": ["string", "string", "string"], + "failure_message": ["string"], "machine": { "failure_message": "failureMessage", "phase": "PHASE_UNSPECIFIED", @@ -475,36 +415,16 @@ async def test_method_update_status_with_all_params(self, async_client: AsyncGit "phase": "CONTENT_PHASE_UNSPECIFIED", "secret_name": "secretName", "warning_message": "warningMessage", - }, - { - "failure_message": "failureMessage", - "phase": "CONTENT_PHASE_UNSPECIFIED", - "secret_name": "secretName", - "warning_message": "warningMessage", - }, - { - "failure_message": "failureMessage", - "phase": "CONTENT_PHASE_UNSPECIFIED", - "secret_name": "secretName", - "warning_message": "warningMessage", - }, + } ], "ssh_public_keys": [ { "id": "id", "phase": "CONTENT_PHASE_UNSPECIFIED", - }, - { - "id": "id", - "phase": "CONTENT_PHASE_UNSPECIFIED", - }, - { - "id": "id", - "phase": "CONTENT_PHASE_UNSPECIFIED", - }, + } ], "status_version": "string", - "warning_message": ["string", "string", "string"], + "warning_message": ["string"], }, connect_timeout_ms=0, ) diff --git a/tests/api_resources/test_automations_files.py b/tests/api_resources/test_automations_files.py index fed1b11..ac65320 100644 --- a/tests/api_resources/test_automations_files.py +++ b/tests/api_resources/test_automations_files.py @@ -38,16 +38,16 @@ def test_method_upsert_with_all_params(self, client: Gitpod) -> None: }, "description": "description", "name": "x", - "triggered_by": ["string", "string", "string"], + "triggered_by": ["string"], } }, "tasks": { "foo": { "command": "x", - "depends_on": ["string", "string", "string"], + "depends_on": ["string"], "description": "description", "name": "x", - "triggered_by": ["string", "string", "string"], + "triggered_by": ["string"], } }, }, @@ -105,16 +105,16 @@ async def test_method_upsert_with_all_params(self, async_client: AsyncGitpod) -> }, "description": "description", "name": "x", - "triggered_by": ["string", "string", "string"], + "triggered_by": ["string"], } }, "tasks": { "foo": { "command": "x", - "depends_on": ["string", "string", "string"], + "depends_on": ["string"], "description": "description", "name": "x", - "triggered_by": ["string", "string", "string"], + "triggered_by": ["string"], } }, }, diff --git a/tests/api_resources/test_environments.py b/tests/api_resources/test_environments.py index db5f3ce..2703867 100644 --- a/tests/api_resources/test_environments.py +++ b/tests/api_resources/test_environments.py @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "content": { "git_email": "gitEmail", "git_username": "gitUsername", - "initializer": {"specs": [{}, {}, {}]}, + "initializer": {"specs": [{}]}, "session": "session", }, "desired_phase": "ENVIRONMENT_PHASE_UNSPECIFIED", @@ -59,33 +59,15 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "admission": "ADMISSION_LEVEL_UNSPECIFIED", "name": "x", "port": 1, - }, - { - "admission": "ADMISSION_LEVEL_UNSPECIFIED", - "name": "x", - "port": 1, - }, - { - "admission": "ADMISSION_LEVEL_UNSPECIFIED", - "name": "x", - "port": 1, - }, + } ], - "secrets": [{}, {}, {}], + "secrets": [{}], "spec_version": "string", "ssh_public_keys": [ { "id": "id", "value": "value", - }, - { - "id": "id", - "value": "value", - }, - { - "id": "id", - "value": "value", - }, + } ], "timeout": {"disconnected": "disconnected"}, }, @@ -169,26 +151,10 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: environment = client.environments.list( connect_protocol_version=1, filter={ - "creator_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "project_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "runner_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "status_phases": [ - "ENVIRONMENT_PHASE_UNSPECIFIED", - "ENVIRONMENT_PHASE_CREATING", - "ENVIRONMENT_PHASE_STARTING", - ], + "creator_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "project_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "runner_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "status_phases": ["ENVIRONMENT_PHASE_UNSPECIFIED"], }, organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", pagination={ @@ -244,7 +210,7 @@ def test_method_create_from_project_with_all_params(self, client: Gitpod) -> Non "content": { "git_email": "gitEmail", "git_username": "gitUsername", - "initializer": {"specs": [{}, {}, {}]}, + "initializer": {"specs": [{}]}, "session": "session", }, "desired_phase": "ENVIRONMENT_PHASE_UNSPECIFIED", @@ -261,33 +227,15 @@ def test_method_create_from_project_with_all_params(self, client: Gitpod) -> Non "admission": "ADMISSION_LEVEL_UNSPECIFIED", "name": "x", "port": 1, - }, - { - "admission": "ADMISSION_LEVEL_UNSPECIFIED", - "name": "x", - "port": 1, - }, - { - "admission": "ADMISSION_LEVEL_UNSPECIFIED", - "name": "x", - "port": 1, - }, + } ], - "secrets": [{}, {}, {}], + "secrets": [{}], "spec_version": "string", "ssh_public_keys": [ { "id": "id", "value": "value", - }, - { - "id": "id", - "value": "value", - }, - { - "id": "id", - "value": "value", - }, + } ], "timeout": {"disconnected": "disconnected"}, }, @@ -383,7 +331,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "content": { "git_email": "gitEmail", "git_username": "gitUsername", - "initializer": {"specs": [{}, {}, {}]}, + "initializer": {"specs": [{}]}, "session": "session", }, "desired_phase": "ENVIRONMENT_PHASE_UNSPECIFIED", @@ -400,33 +348,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "admission": "ADMISSION_LEVEL_UNSPECIFIED", "name": "x", "port": 1, - }, - { - "admission": "ADMISSION_LEVEL_UNSPECIFIED", - "name": "x", - "port": 1, - }, - { - "admission": "ADMISSION_LEVEL_UNSPECIFIED", - "name": "x", - "port": 1, - }, + } ], - "secrets": [{}, {}, {}], + "secrets": [{}], "spec_version": "string", "ssh_public_keys": [ { "id": "id", "value": "value", - }, - { - "id": "id", - "value": "value", - }, - { - "id": "id", - "value": "value", - }, + } ], "timeout": {"disconnected": "disconnected"}, }, @@ -510,26 +440,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N environment = await async_client.environments.list( connect_protocol_version=1, filter={ - "creator_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "project_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "runner_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "status_phases": [ - "ENVIRONMENT_PHASE_UNSPECIFIED", - "ENVIRONMENT_PHASE_CREATING", - "ENVIRONMENT_PHASE_STARTING", - ], + "creator_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "project_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "runner_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "status_phases": ["ENVIRONMENT_PHASE_UNSPECIFIED"], }, organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", pagination={ @@ -585,7 +499,7 @@ async def test_method_create_from_project_with_all_params(self, async_client: As "content": { "git_email": "gitEmail", "git_username": "gitUsername", - "initializer": {"specs": [{}, {}, {}]}, + "initializer": {"specs": [{}]}, "session": "session", }, "desired_phase": "ENVIRONMENT_PHASE_UNSPECIFIED", @@ -602,33 +516,15 @@ async def test_method_create_from_project_with_all_params(self, async_client: As "admission": "ADMISSION_LEVEL_UNSPECIFIED", "name": "x", "port": 1, - }, - { - "admission": "ADMISSION_LEVEL_UNSPECIFIED", - "name": "x", - "port": 1, - }, - { - "admission": "ADMISSION_LEVEL_UNSPECIFIED", - "name": "x", - "port": 1, - }, + } ], - "secrets": [{}, {}, {}], + "secrets": [{}], "spec_version": "string", "ssh_public_keys": [ { "id": "id", "value": "value", - }, - { - "id": "id", - "value": "value", - }, - { - "id": "id", - "value": "value", - }, + } ], "timeout": {"disconnected": "disconnected"}, }, diff --git a/tests/api_resources/test_personal_access_tokens.py b/tests/api_resources/test_personal_access_tokens.py index 4ada66d..42b2680 100644 --- a/tests/api_resources/test_personal_access_tokens.py +++ b/tests/api_resources/test_personal_access_tokens.py @@ -30,13 +30,7 @@ def test_method_list(self, client: Gitpod) -> None: def test_method_list_with_all_params(self, client: Gitpod) -> None: personal_access_token = client.personal_access_tokens.list( connect_protocol_version=1, - filter={ - "user_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ] - }, + filter={"user_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, pagination={ "token": "token", "page_size": 0, @@ -124,13 +118,7 @@ async def test_method_list(self, async_client: AsyncGitpod) -> None: async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: personal_access_token = await async_client.personal_access_tokens.list( connect_protocol_version=1, - filter={ - "user_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ] - }, + filter={"user_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, pagination={ "token": "token", "page_size": 0, diff --git a/tests/api_resources/test_projects.py b/tests/api_resources/test_projects.py index 04dcaf3..c06e96d 100644 --- a/tests/api_resources/test_projects.py +++ b/tests/api_resources/test_projects.py @@ -34,7 +34,7 @@ def test_method_create(self, client: Gitpod) -> None: def test_method_create_with_all_params(self, client: Gitpod) -> None: project = client.projects.create( environment_class={}, - initializer={"specs": [{}, {}, {}]}, + initializer={"specs": [{}]}, connect_protocol_version=1, automations_file_path="automationsFilePath", devcontainer_file_path="devcontainerFilePath", @@ -173,7 +173,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: project = await async_client.projects.create( environment_class={}, - initializer={"specs": [{}, {}, {}]}, + initializer={"specs": [{}]}, connect_protocol_version=1, automations_file_path="automationsFilePath", devcontainer_file_path="devcontainerFilePath", diff --git a/tests/api_resources/test_runner_interactions.py b/tests/api_resources/test_runner_interactions.py index 5a73d53..87605b0 100644 --- a/tests/api_resources/test_runner_interactions.py +++ b/tests/api_resources/test_runner_interactions.py @@ -128,13 +128,7 @@ def test_method_list_runner_environment_classes(self, client: Gitpod) -> None: def test_method_list_runner_environment_classes_with_all_params(self, client: Gitpod) -> None: runner_interaction = client.runner_interactions.list_runner_environment_classes( connect_protocol_version=1, - filter={ - "environment_class_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ] - }, + filter={"environment_class_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, pagination={ "token": "token", "page_size": 0, @@ -185,13 +179,7 @@ def test_method_list_runner_scm_integrations(self, client: Gitpod) -> None: def test_method_list_runner_scm_integrations_with_all_params(self, client: Gitpod) -> None: runner_interaction = client.runner_interactions.list_runner_scm_integrations( connect_protocol_version=1, - filter={ - "scm_integration_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ] - }, + filter={"scm_integration_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, pagination={ "token": "token", "page_size": 0, @@ -543,63 +531,13 @@ def test_method_signup_with_all_params(self, client: Gitpod) -> None: { "key": "key", "value": "value", - }, - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, - ], - "description": "xxx", - "display_name": "xxx", - "enabled": True, - "runner_id": "runnerId", - }, - { - "id": "id", - "configuration": [ - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, + } ], "description": "xxx", "display_name": "xxx", "enabled": True, "runner_id": "runnerId", - }, - { - "id": "id", - "configuration": [ - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, - ], - "description": "xxx", - "display_name": "xxx", - "enabled": True, - "runner_id": "runnerId", - }, + } ], public_key="U3RhaW5sZXNzIHJvY2tz", connect_timeout_ms=0, @@ -642,31 +580,11 @@ def test_method_update_runner_configuration_schema_with_all_params(self, client: runner_interaction = client.runner_interactions.update_runner_configuration_schema( connect_protocol_version=1, config_schema={ - "environment_classes": [{}, {}, {}], - "runner_config": [{}, {}, {}], + "environment_classes": [{}], + "runner_config": [{}], "scm": [ { - "default_hosts": ["string", "string", "string"], - "name": "name", - "oauth": {"callback_url": "callbackUrl"}, - "pat": { - "description": "description", - "docs_link": "docsLink", - }, - "scm_id": "scmId", - }, - { - "default_hosts": ["string", "string", "string"], - "name": "name", - "oauth": {"callback_url": "callbackUrl"}, - "pat": { - "description": "description", - "docs_link": "docsLink", - }, - "scm_id": "scmId", - }, - { - "default_hosts": ["string", "string", "string"], + "default_hosts": ["string"], "name": "name", "oauth": {"callback_url": "callbackUrl"}, "pat": { @@ -674,7 +592,7 @@ def test_method_update_runner_configuration_schema_with_all_params(self, client: "docs_link": "docsLink", }, "scm_id": "scmId", - }, + } ], "version": "version", }, @@ -719,7 +637,7 @@ def test_method_update_status(self, client: Gitpod) -> None: def test_method_update_status_with_all_params(self, client: Gitpod) -> None: runner_interaction = client.runner_interactions.update_status( body={ - "additionalInfo": [{}, {}, {}], + "additionalInfo": [{}], "degredationMessage": "degredationMessage", "logUrl": "https://example.com", "region": "region", @@ -867,13 +785,7 @@ async def test_method_list_runner_environment_classes(self, async_client: AsyncG async def test_method_list_runner_environment_classes_with_all_params(self, async_client: AsyncGitpod) -> None: runner_interaction = await async_client.runner_interactions.list_runner_environment_classes( connect_protocol_version=1, - filter={ - "environment_class_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ] - }, + filter={"environment_class_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, pagination={ "token": "token", "page_size": 0, @@ -924,13 +836,7 @@ async def test_method_list_runner_scm_integrations(self, async_client: AsyncGitp async def test_method_list_runner_scm_integrations_with_all_params(self, async_client: AsyncGitpod) -> None: runner_interaction = await async_client.runner_interactions.list_runner_scm_integrations( connect_protocol_version=1, - filter={ - "scm_integration_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ] - }, + filter={"scm_integration_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}, pagination={ "token": "token", "page_size": 0, @@ -1282,63 +1188,13 @@ async def test_method_signup_with_all_params(self, async_client: AsyncGitpod) -> { "key": "key", "value": "value", - }, - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, - ], - "description": "xxx", - "display_name": "xxx", - "enabled": True, - "runner_id": "runnerId", - }, - { - "id": "id", - "configuration": [ - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, + } ], "description": "xxx", "display_name": "xxx", "enabled": True, "runner_id": "runnerId", - }, - { - "id": "id", - "configuration": [ - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, - { - "key": "key", - "value": "value", - }, - ], - "description": "xxx", - "display_name": "xxx", - "enabled": True, - "runner_id": "runnerId", - }, + } ], public_key="U3RhaW5sZXNzIHJvY2tz", connect_timeout_ms=0, @@ -1381,31 +1237,11 @@ async def test_method_update_runner_configuration_schema_with_all_params(self, a runner_interaction = await async_client.runner_interactions.update_runner_configuration_schema( connect_protocol_version=1, config_schema={ - "environment_classes": [{}, {}, {}], - "runner_config": [{}, {}, {}], + "environment_classes": [{}], + "runner_config": [{}], "scm": [ { - "default_hosts": ["string", "string", "string"], - "name": "name", - "oauth": {"callback_url": "callbackUrl"}, - "pat": { - "description": "description", - "docs_link": "docsLink", - }, - "scm_id": "scmId", - }, - { - "default_hosts": ["string", "string", "string"], - "name": "name", - "oauth": {"callback_url": "callbackUrl"}, - "pat": { - "description": "description", - "docs_link": "docsLink", - }, - "scm_id": "scmId", - }, - { - "default_hosts": ["string", "string", "string"], + "default_hosts": ["string"], "name": "name", "oauth": {"callback_url": "callbackUrl"}, "pat": { @@ -1413,7 +1249,7 @@ async def test_method_update_runner_configuration_schema_with_all_params(self, a "docs_link": "docsLink", }, "scm_id": "scmId", - }, + } ], "version": "version", }, @@ -1458,7 +1294,7 @@ async def test_method_update_status(self, async_client: AsyncGitpod) -> None: async def test_method_update_status_with_all_params(self, async_client: AsyncGitpod) -> None: runner_interaction = await async_client.runner_interactions.update_status( body={ - "additionalInfo": [{}, {}, {}], + "additionalInfo": [{}], "degredationMessage": "degredationMessage", "logUrl": "https://example.com", "region": "region", diff --git a/tests/api_resources/test_runners.py b/tests/api_resources/test_runners.py index 9bb0341..53d6aa1 100644 --- a/tests/api_resources/test_runners.py +++ b/tests/api_resources/test_runners.py @@ -130,12 +130,8 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: runner = client.runners.list( connect_protocol_version=1, filter={ - "creator_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "kinds": ["RUNNER_KIND_UNSPECIFIED", "RUNNER_KIND_LOCAL", "RUNNER_KIND_REMOTE"], + "creator_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "kinds": ["RUNNER_KIND_UNSPECIFIED"], }, pagination={ "token": "token", @@ -528,12 +524,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N runner = await async_client.runners.list( connect_protocol_version=1, filter={ - "creator_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "kinds": ["RUNNER_KIND_UNSPECIFIED", "RUNNER_KIND_LOCAL", "RUNNER_KIND_REMOTE"], + "creator_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "kinds": ["RUNNER_KIND_UNSPECIFIED"], }, pagination={ "token": "token", diff --git a/tests/api_resources/test_services.py b/tests/api_resources/test_services.py index 115968e..cc347f6 100644 --- a/tests/api_resources/test_services.py +++ b/tests/api_resources/test_services.py @@ -160,17 +160,9 @@ def test_method_list_create_with_all_params(self, client: Gitpod) -> None: service = client.services.list_create( connect_protocol_version=1, filter={ - "environment_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "references": ["x", "x", "x"], - "service_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "references": ["x"], + "service_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], }, pagination={ "token": "token", @@ -428,17 +420,9 @@ async def test_method_list_create_with_all_params(self, async_client: AsyncGitpo service = await async_client.services.list_create( connect_protocol_version=1, filter={ - "environment_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], - "references": ["x", "x", "x"], - "service_ids": [ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + "environment_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], + "references": ["x"], + "service_ids": ["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], }, pagination={ "token": "token", diff --git a/tests/api_resources/test_tasks.py b/tests/api_resources/test_tasks.py index f0a4ea0..1e59c29 100644 --- a/tests/api_resources/test_tasks.py +++ b/tests/api_resources/test_tasks.py @@ -33,11 +33,7 @@ def test_method_create(self, client: Gitpod) -> None: def test_method_create_with_all_params(self, client: Gitpod) -> None: task = client.tasks.create( connect_protocol_version=1, - depends_on=[ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + depends_on=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", metadata={ "created_at": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -48,7 +44,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: "description": "description", "name": "x", "reference": "reference", - "triggered_by": [{}, {}, {}], + "triggered_by": [{}], }, spec={"command": "command"}, connect_timeout_ms=0, @@ -178,11 +174,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: task = await async_client.tasks.create( connect_protocol_version=1, - depends_on=[ - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - ], + depends_on=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"], environment_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", metadata={ "created_at": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -193,7 +185,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> "description": "description", "name": "x", "reference": "reference", - "triggered_by": [{}, {}, {}], + "triggered_by": [{}], }, spec={"command": "command"}, connect_timeout_ms=0,