Skip to content

Commit a4bc873

Browse files
Showcase 0.0.7 (#52)
1 parent 07f7b53 commit a4bc873

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

packages/gapic-generator/.circleci/config.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,16 @@ jobs:
7878
unzip protoc-3.6.1.zip
7979
ln -s /usr/src/protoc/bin/protoc /usr/local/bin/protoc
8080
- run:
81-
name: Download Showcase.
81+
name: Download and extract Showcase.
8282
command: |
83-
curl --location https://github.com/googleapis/gapic-showcase/releases/download/v0.0.3/gapic-showcase-v1alpha1-0.0.3-linux-amd64 --output /usr/local/bin/showcase
83+
curl --location https://github.com/googleapis/gapic-showcase/releases/download/v0.0.7/gapic-showcase-0.0.7-linux-amd64.tar.gz --output /tmp/gapic-showcase.tar.gz
84+
cd /tmp
85+
tar xvfz /tmp/gapic-showcase.tar.gz
86+
mv /tmp/gapic-showcase /usr/local/bin/showcase
8487
chmod a+x /usr/local/bin/showcase
8588
- run:
8689
name: Run Showcase.
87-
command: /usr/local/bin/showcase
90+
command: /usr/local/bin/showcase start
8891
background: true
8992
- run:
9093
name: Run showcase tests.

packages/gapic-generator/nox.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ def showcase(session):
5757

5858
# Install a client library for Showcase.
5959
with tempfile.TemporaryDirectory() as tmp_dir:
60-
showcase_version = '0.0.3'
60+
showcase_version = '0.0.7'
6161

6262
# Download the Showcase descriptor.
6363
session.run(
6464
'curl', 'https://github.com/googleapis/gapic-showcase/releases/'
6565
f'download/v{showcase_version}/'
66-
f'gapic-showcase-v1alpha1-{showcase_version}.desc',
66+
f'gapic-showcase-{showcase_version}.desc',
6767
'-L', '--output', os.path.join(tmp_dir, 'showcase.desc'),
6868
silent=True,
6969
)
@@ -72,7 +72,7 @@ def showcase(session):
7272
session.run('protoc',
7373
f'--descriptor_set_in={tmp_dir}{os.path.sep}showcase.desc',
7474
f'--pyclient_out={tmp_dir}',
75-
'google/showcase/v1alpha1/showcase.proto',
75+
'google/showcase/v1alpha2/echo.proto',
7676
)
7777

7878
# Install the library.

packages/gapic-generator/tests/system/conftest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
import pytest
1616

1717
from google.auth.credentials import AnonymousCredentials
18-
from google.showcase import Showcase
19-
from google.showcase_v1alpha1.services.showcase.transports.grpc import (
20-
ShowcaseGrpcTransport,
18+
from google.showcase import Echo
19+
from google.showcase_v1alpha2.services.echo.transports.grpc import (
20+
EchoGrpcTransport,
2121
)
2222

2323
import grpc
2424

2525

2626
@pytest.fixture
27-
def showcase():
28-
transport = ShowcaseGrpcTransport(credentials=AnonymousCredentials())
27+
def echo():
28+
transport = EchoGrpcTransport(credentials=AnonymousCredentials())
2929
transport.__dict__['grpc_channel'] = grpc.insecure_channel(
3030
transport.SERVICE_ADDRESS,
3131
)
32-
return Showcase(transport=transport)
32+
return Echo(transport=transport)

packages/gapic-generator/tests/system/test_grpc_unary.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
from google.rpc import code_pb2
1919

2020

21-
def test_unary(showcase):
22-
response = showcase.echo({
21+
def test_unary(echo):
22+
response = echo.echo({
2323
'content': 'The hail in Wales falls mainly on the snails.',
2424
})
2525
assert response.content == 'The hail in Wales falls mainly on the snails.'
2626

2727

28-
def test_unary_error(showcase):
28+
def test_unary_error(echo):
2929
with pytest.raises(exceptions.InvalidArgument) as exc:
30-
showcase.echo({
30+
echo.echo({
3131
'error': {
3232
'code': code_pb2.Code.Value('INVALID_ARGUMENT'),
3333
'message': 'Bad things! Bad things!',

0 commit comments

Comments
 (0)