Skip to content

Commit 95fca64

Browse files
committed
convert system test to smoke test
1 parent 001f0b4 commit 95fca64

3 files changed

Lines changed: 53 additions & 342 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2023 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.

packages/google-cloud-automl/tests/system/gapic/v1beta1/test_system_tables_client_v1.py

Lines changed: 0 additions & 342 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2023 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
import os
17+
18+
import pytest
19+
20+
from google.cloud import automl_v1
21+
22+
23+
@pytest.fixture(scope="session")
24+
def project_id():
25+
return os.environ["PROJECT_ID"]
26+
27+
28+
@pytest.mark.parametrize("transport", ["grpc", "rest"])
29+
def test_list_models(project_id: str, transport: str):
30+
client = automl_v1.AutoMlClient(transport=transport)
31+
32+
parent = client.common_location_path(project_id, location="us-central1")
33+
client.list_models(parent=parent)
34+
35+
# The purpose of this smoke test is to test the communication with the API server,
36+
# rather than API-specific functionality.
37+
# If the smoke test fails, we won't reach this line.
38+
assert True

0 commit comments

Comments
 (0)