|
8 | 8 | from labelbox import Client |
9 | 9 | from labelbox.schema.iam_integration import ( |
10 | 10 | AwsIamIntegrationSettings, |
11 | | - GcpIamIntegrationSettings, |
12 | 11 | AzureIamIntegrationSettings, |
13 | 12 | ) |
14 | 13 | from ..conftest import create_dataset_robust |
@@ -47,23 +46,6 @@ def aws_integration( |
47 | 46 | delete_iam_integration(client, integration.uid) |
48 | 47 |
|
49 | 48 |
|
50 | | -@pytest.fixture |
51 | | -def gcp_integration( |
52 | | - client, test_integration_name |
53 | | -) -> Optional["IAMIntegration"]: |
54 | | - """Creates a test GCP integration and cleans it up after the test.""" |
55 | | - settings = GcpIamIntegrationSettings( |
56 | | - read_bucket="gs://test-bucket", |
57 | | - ) |
58 | | - integration = client.get_organization().create_iam_integration( |
59 | | - name=test_integration_name, |
60 | | - settings=settings, |
61 | | - ) |
62 | | - yield integration |
63 | | - # Proper cleanup using delete mutation |
64 | | - delete_iam_integration(client, integration.uid) |
65 | | - |
66 | | - |
67 | 49 | @pytest.fixture |
68 | 50 | def azure_integration( |
69 | 51 | client, test_integration_name |
@@ -103,23 +85,6 @@ def test_create_aws_integration(client, test_integration_name): |
103 | 85 | delete_iam_integration(client, integration.uid) |
104 | 86 |
|
105 | 87 |
|
106 | | -def test_create_gcp_integration(client, test_integration_name): |
107 | | - """Test creating a GCP IAM integration.""" |
108 | | - settings = GcpIamIntegrationSettings(read_bucket="gs://test-bucket") |
109 | | - integration = client.get_organization().create_iam_integration( |
110 | | - name=test_integration_name, settings=settings |
111 | | - ) |
112 | | - |
113 | | - try: |
114 | | - assert integration.name == test_integration_name |
115 | | - assert integration.provider == "GCP" |
116 | | - assert isinstance(integration.settings, GcpIamIntegrationSettings) |
117 | | - assert integration.settings.read_bucket == settings.read_bucket |
118 | | - finally: |
119 | | - # Ensure cleanup even if assertions fail |
120 | | - delete_iam_integration(client, integration.uid) |
121 | | - |
122 | | - |
123 | 88 | def test_create_azure_integration(client, test_integration_name): |
124 | 89 | """Test creating an Azure IAM integration.""" |
125 | 90 | settings = AzureIamIntegrationSettings( |
@@ -180,38 +145,6 @@ def test_update_aws_integration(client, test_integration_name): |
180 | 145 | delete_iam_integration(client, integration.uid) |
181 | 146 |
|
182 | 147 |
|
183 | | -def test_update_gcp_integration(client, test_integration_name): |
184 | | - """Test updating a GCP IAM integration.""" |
185 | | - # Create initial integration |
186 | | - settings = GcpIamIntegrationSettings(read_bucket="gs://test-bucket") |
187 | | - integration = client.get_organization().create_iam_integration( |
188 | | - name=test_integration_name, settings=settings |
189 | | - ) |
190 | | - |
191 | | - try: |
192 | | - # Update integration |
193 | | - new_settings = GcpIamIntegrationSettings( |
194 | | - read_bucket="gs://updated-bucket" |
195 | | - ) |
196 | | - integration.update( |
197 | | - name=f"updated-{test_integration_name}", settings=new_settings |
198 | | - ) |
199 | | - |
200 | | - # Verify update - find the specific integration by ID |
201 | | - updated_integration = None |
202 | | - for iam_int in client.get_organization().get_iam_integrations(): |
203 | | - if iam_int.uid == integration.uid: |
204 | | - updated_integration = iam_int |
205 | | - break |
206 | | - |
207 | | - assert updated_integration is not None |
208 | | - assert updated_integration.name == f"updated-{test_integration_name}" |
209 | | - # Note: Settings may not be returned immediately after update |
210 | | - finally: |
211 | | - # Ensure cleanup even if assertions fail |
212 | | - delete_iam_integration(client, integration.uid) |
213 | | - |
214 | | - |
215 | 148 | def test_update_azure_integration(client, test_integration_name): |
216 | 149 | """Test updating an Azure IAM integration.""" |
217 | 150 | # Create initial integration |
|
0 commit comments