|
12 | 12 | from ocp_resources.namespace import Namespace |
13 | 13 | from ocp_resources.pod import Pod |
14 | 14 | from ocp_resources.secret import Secret |
15 | | -from ocp_resources.service import Service |
16 | 15 | from ocp_resources.subscription import Subscription |
17 | 16 | from ocp_resources.trustyai_service import TrustyAIService |
18 | 17 | from ocp_utilities.operators import install_operator, uninstall_operator |
@@ -127,54 +126,6 @@ def minio_pod(admin_client: DynamicClient, model_namespace: Namespace) -> Genera |
127 | 126 | yield minio_pod |
128 | 127 |
|
129 | 128 |
|
130 | | -@pytest.fixture(scope="class") |
131 | | -def minio_service(admin_client: DynamicClient, model_namespace: Namespace) -> Generator[Service, Any, Any]: |
132 | | - with Service( |
133 | | - client=admin_client, |
134 | | - name=MINIO, |
135 | | - namespace=model_namespace.name, |
136 | | - ports=[ |
137 | | - { |
138 | | - "name": "minio-client-port", |
139 | | - "port": 9000, |
140 | | - "protocol": "TCP", |
141 | | - "targetPort": 9000, |
142 | | - } |
143 | | - ], |
144 | | - selector={ |
145 | | - "app": MINIO, |
146 | | - }, |
147 | | - ) as minio_service: |
148 | | - yield minio_service |
149 | | - |
150 | | - |
151 | | -@pytest.fixture(scope="class") |
152 | | -def minio_data_connection( |
153 | | - admin_client: DynamicClient, model_namespace: Namespace, minio_pod: Pod, minio_service: Service |
154 | | -) -> Generator[Secret, Any, Any]: |
155 | | - with Secret( |
156 | | - client=admin_client, |
157 | | - name="aws-connection-minio-data-connection", |
158 | | - namespace=model_namespace.name, |
159 | | - data_dict={ |
160 | | - "AWS_ACCESS_KEY_ID": "VEhFQUNDRVNTS0VZ", |
161 | | - "AWS_DEFAULT_REGION": "dXMtc291dGg=", |
162 | | - "AWS_S3_BUCKET": "bW9kZWxtZXNoLWV4YW1wbGUtbW9kZWxz", |
163 | | - "AWS_S3_ENDPOINT": "aHR0cDovL21pbmlvOjkwMDA=", |
164 | | - "AWS_SECRET_ACCESS_KEY": "VEhFU0VDUkVUS0VZ", # pragma: allowlist secret |
165 | | - }, |
166 | | - label={ |
167 | | - f"{OPENDATAHUB_IO}/dashboard": "true", |
168 | | - f"{OPENDATAHUB_IO}/managed": "true", |
169 | | - }, |
170 | | - annotations={ |
171 | | - f"{OPENDATAHUB_IO}/connection-type": "s3", |
172 | | - "openshift.io/display-name": "Minio Data Connection", |
173 | | - }, |
174 | | - ) as minio_secret: |
175 | | - yield minio_secret |
176 | | - |
177 | | - |
178 | 129 | @pytest.fixture(scope="class") |
179 | 130 | def db_credentials_secret(admin_client: DynamicClient, model_namespace: Namespace) -> Generator[Secret, Any, Any]: |
180 | 131 | with Secret( |
|
0 commit comments