Repository: googleapis/gapic-generator-go
Pull request #94 (2019-02-20 21:19:42)

gapic: in-repo showcase integration
* add a `showcase` module with (refactored from gapic-generator) Echo Service tests
* update utils/showcase.bash to use in-repo tests


Patch:
diff --git a/.gitignore b/.gitignore
index 0a4662a..d66c90c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 /testdata/out
 perf.data*
 /cover.prof
-showcase-testdir
+showcase/gen
+showcase/gapic-showcase
diff --git a/Makefile b/Makefile
index 719b91d..2e8ff7a 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,8 @@ test:
 	./utils/showcase.bash
 
 clean:
-	rm -rf showcase-testdir
 	rm -rf testdata
 	rm -rf cmd/protoc-gen-go_cli/testprotos
-	rm -rf cmd/protoc-gen-go_cli/testdata	
\ No newline at end of file
+	rm -rf cmd/protoc-gen-go_cli/testdata	
+	rm -rf showcase/gen
+	rm -f showcase/gapic-showcase
diff --git a/go.sum b/go.sum
index a6fe999..d1a97a1 100644
--- a/go.sum
+++ b/go.sum
@@ -1,3 +1,5 @@
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 github.com/golang-commonmark/html v0.0.0-20180910111043-7d7c804e1d46 h1:FeNEDxIy7XouGTJKiJ9Ze5vUbcAIW/FRhQbtKBNmEz8=
 github.com/golang-commonmark/html v0.0.0-20180910111043-7d7c804e1d46/go.mod h1:LVbxopYhspqklDpfaS/qDc6HhWwkpF1ptTj3vMFRoSQ=
 github.com/golang-commonmark/linkify v0.0.0-20180910111149-f05efb453a0e h1:TkuRzcq232K5ytXtQ+BPicsjYWZgt/lS6gJ5HqcUifQ=
@@ -8,20 +10,37 @@ github.com/golang-commonmark/mdurl v0.0.0-20180910110917-8d018c6567d6 h1:XkgfhPs
 github.com/golang-commonmark/mdurl v0.0.0-20180910110917-8d018c6567d6/go.mod h1:J66ZGl/dC2mj4ElzGfrLUq0N90HvQoUbrYgYNJUjuMs=
 github.com/golang-commonmark/puny v0.0.0-20180910110745-050be392d8b8 h1:DUgQdQmDg4sk4SfNR+qOkXcopGz36BL02vp/V7WbPQI=
 github.com/golang-commonmark/puny v0.0.0-20180910110745-050be392d8b8/go.mod h1:/8a6mcbf/Hwg6MjnHHp5vqCWw0Bsves9HLPObHAj7XA=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
 github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
 github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
 github.com/opennota/wd v0.0.0-20180911144301-b446539ab1e7 h1:cVQhwfBgiKTMAdYPbVeuIiTkdY59qZ3sp5RpyO8CNtg=
 github.com/opennota/wd v0.0.0-20180911144301-b446539ab1e7/go.mod h1:CS6cd3lWylVJV6EWs4Q/lkDEVGQOrEbBdwCowzzkN6A=
 github.com/russross/blackfriday v2.0.0+incompatible h1:cBXrhZNUf9C+La9/YpS+UHpUT8YD6Td9ZMSU9APFcsk=
 github.com/russross/blackfriday v2.0.0+incompatible/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
 github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95 h1:/vdW8Cb7EXrkqWGufVMES1OH2sU9gKVb2n9/1y5NMBY=
 github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20190206173232-65e2d4e15006 h1:bfLnR+k0tq5Lqt6dflRLcZiz6UaXCMt3vhYJ1l4FQ80=
 golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522 h1:Ve1ORMCxvRmSXBwJK+t3Oy+V2vRW2OetUQBq4rJIkZE=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/grpc v1.18.0 h1:IZl7mfBGfbhYx2p2rKRtYgDFw6SBz+kclmxYrCksPPA=
+google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
 gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/showcase/go.mod b/showcase/go.mod
new file mode 100644
index 0000000..575da51
--- /dev/null
+++ b/showcase/go.mod
@@ -0,0 +1,14 @@
+module showcase_integration
+
+require (
+	cloud.google.com/go/showcase v0.0.0
+	github.com/golang/protobuf v1.2.0
+	github.com/googleapis/gapic-showcase v0.0.11
+	github.com/googleapis/gax-go v0.0.0-20181219185031-c8a15bac9b9f // indirect
+	github.com/googleapis/gax-go/v2 v2.0.3 // indirect
+	google.golang.org/api v0.1.0
+	google.golang.org/genproto v0.0.0-20190219182410-082222b4a5c5
+	google.golang.org/grpc v1.18.0
+)
+
+replace cloud.google.com/go/showcase => ./gen/cloud.google.com/go/showcase
diff --git a/showcase/go.sum b/showcase/go.sum
new file mode 100644
index 0000000..dd3d69f
--- /dev/null
+++ b/showcase/go.sum
@@ -0,0 +1,66 @@
+cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=
+cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
+git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
+github.com/googleapis/gapic-showcase v0.0.11 h1:9HZ/sPZkCYJyjB1lHm6YY6t/h9Ku7lmq5LPF5ilFr2A=
+github.com/googleapis/gapic-showcase v0.0.11/go.mod h1:wgKpk+nvtqYGm1+T7C3O/t27PwCOOml/PyXqMvi0ysI=
+github.com/googleapis/gax-go v0.0.0-20181219185031-c8a15bac9b9f h1:UagDZv2cTLFNxuFiG5WvbbxtKTwbLWec8QUnFNqS6Ho=
+github.com/googleapis/gax-go v0.0.0-20181219185031-c8a15bac9b9f/go.mod h1:5VvnLYVimBt+hOVlFtJDkYQHVmk4K27qHHioZjPbYAI=
+github.com/googleapis/gax-go/v2 v2.0.2/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=
+github.com/googleapis/gax-go/v2 v2.0.3 h1:siORttZ36U2R/WjiJuDz8znElWBiAlO9rVt+mqJt0Cc=
+github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=
+github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
+github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
+github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
+github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
+github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+go.opencensus.io v0.18.0 h1:Mk5rgZcggtbvtAun5aJzAtjKKN/t0R3jJPlWILlv938=
+go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
+golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20181106065722-10aee1819953 h1:LuZIitY8waaxUfNIdtajyE/YzA/zyf0YxXG27VpLrkg=
+golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 h1:uESlIz09WIHT2I+pasSXcpLYqYK8wHcdCetU3VuMBJE=
+golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
+google.golang.org/api v0.1.0 h1:K6z2u68e86TPdSdefXdzvXgR1zEMa+459vBSfWYAZkI=
+google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
+google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
+google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg=
+google.golang.org/genproto v0.0.0-20190219182410-082222b4a5c5 h1:SdCO7As+ChE1iV3IjBleIIWlj8VjZWuYEUF5pjELOOQ=
+google.golang.org/genproto v0.0.0-20190219182410-082222b4a5c5/go.mod h1:L3J43x8/uS+qIUoksaLKe6OS3nUKxOKuIFz1sl2/jx4=
+google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
+google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
+google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
+google.golang.org/grpc v1.18.0 h1:IZl7mfBGfbhYx2p2rKRtYgDFw6SBz+kclmxYrCksPPA=
+google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/utils/showcase.bash b/utils/showcase.bash
index 95f3dd3..76bf6eb 100755
--- a/utils/showcase.bash
+++ b/utils/showcase.bash
@@ -21,39 +21,22 @@ if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then
 	return
 fi
 
-# Setup a test workspace. We gitignore this.
-rm -rf showcase-testdir
-mkdir showcase-testdir/
-
-cd showcase-testdir
-go mod init showcase-test
-go mod edit -require=github.com/googleapis/gapic-showcase@v0.0.7
+pushd showcase
+rm -rf gen
+mkdir gen
 
 protoc \
-	--go_gapic_out . \
-	--go_gapic_opt 'go-gapic-package=cloud.google.com/go/showcase/apiv1alpha2;showcase' \
-	--descriptor_set_in=<(curl -sSL https://github.com/googleapis/gapic-showcase/releases/download/v0.0.7/gapic-showcase-0.0.7.desc) \
-	google/showcase/v1alpha2/echo.proto
-
-# TODO(pongad): Move this file into this repository once we deprecate the old generator.
-curl -sSL https://raw.githubusercontent.com/googleapis/gapic-generator/753ff9d8a04a59962f3b8c2c06cb79be7df344c8/showcase/go/showcase_integration_test.go \
-	> showcase_integration_test.go
+	--go_gapic_out ./gen \
+	--go_gapic_opt 'go-gapic-package=cloud.google.com/go/showcase/apiv1alpha3;showcase' \
+	--descriptor_set_in=<(curl -sSL https://github.com/googleapis/gapic-showcase/releases/download/v0.0.11/gapic-showcase-0.0.11.desc) \
+	google/showcase/v1alpha3/echo.proto
 
-# If the package name of the generated package is "a/b/c", we write files under directory "$OUT/a/b/c",
-# where OUT is the directory passed to protoc. Prior to Go 1.11, we set OUT=$GOPATH/src.
-# This works well because that's where we expect to find the package a/b/c.
-#
-# This plays badly with modules however. In `go mod init` above, we set our module name to "showcase-test",
-# and set module root to showcase-testdir (because that's where the file is). If we set OUT=showcase-testdir,
-# we generate the files to showcase-testdir/a/b/c, but the import path of this package would actually be showcase-testdir/a/b/c,
-# not a/b/c as expected from the previous paragraph. We have to rewrite imports to keep this working.
-#
-# We copy this behavior from protoc-gen-go, so they're probably having the same problem with modules. Therefore...
-# TODO(pongad): figure out what protoc-gen-go is doing to solve this then do the same thing.
-find -name '*.go' | xargs sed -i 's,cloud.google.com/go/showcase/apiv1alpha2,showcase-test/&,g'
+pushd gen/cloud.google.com/go/showcase
+go mod init cloud.google.com/go/showcase
+popd
 
-curl -sSL https://github.com/googleapis/gapic-showcase/releases/download/v0.0.7/gapic-showcase-0.0.7-linux-amd64.tar.gz | tar xz
-./gapic-showcase start &
+curl -sSL https://github.com/googleapis/gapic-showcase/releases/download/v0.0.11/gapic-showcase-0.0.11-linux-amd64.tar.gz | tar xz
+./gapic-showcase run &
 showcase_pid=$!
 
 stop_showcase() {
@@ -64,3 +47,4 @@ stop_showcase() {
 trap stop_showcase EXIT
 
 go test -count=1 ./...
+popd


Test patch:
diff --git a/showcase/echo_test.go b/showcase/echo_test.go
new file mode 100644
index 0000000..7c8e2b9
--- /dev/null
+++ b/showcase/echo_test.go
@@ -0,0 +1,233 @@
+// Copyright 2019 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package showcase_integration
+
+import (
+	"context"
+	"flag"
+	"io"
+	"log"
+	"os"
+	"strings"
+	"testing"
+	"time"
+
+	showcase "cloud.google.com/go/showcase/apiv1alpha3"
+	durationpb "github.com/golang/protobuf/ptypes/duration"
+	genprotopb "github.com/googleapis/gapic-showcase/server/genproto"
+	"google.golang.org/api/iterator"
+	"google.golang.org/api/option"
+	spb "google.golang.org/genproto/googleapis/rpc/status"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/codes"
+	"google.golang.org/grpc/status"
+)
+
+var client *showcase.EchoClient
+
+func TestMain(m *testing.M) {
+	flag.Parse()
+
+	conn, err := grpc.Dial("localhost:7469", grpc.WithInsecure())
+	if err != nil {
+		log.Fatal(err)
+	}
+	clientOpt := option.WithGRPCConn(conn)
+	client, err = showcase.NewEchoClient(context.Background(), clientOpt)
+	if err != nil {
+		log.Fatal(err)
+	}
+
+	os.Exit(m.Run())
+}
+
+func TestEcho(t *testing.T) {
+	t.Parallel()
+	content := "hello world!"
+	req := &genprotopb.EchoRequest{
+		Response: &genprotopb.EchoRequest_Content{
+			Content: content,
+		},
+	}
+	resp, err := client.Echo(context.Background(), req)
+
+	if err != nil {
+		t.Fatal(err)
+	}
+	if resp.GetContent() != req.GetContent() {
+		t.Errorf("Echo() = %q, want %q", resp.GetContent(), content)
+	}
+}
+
+func TestEcho_error(t *testing.T) {
+	t.Parallel()
+	val := codes.Canceled
+	req := &genprotopb.EchoRequest{
+		Response: &genprotopb.EchoRequest_Error{
+			Error: &spb.Status{Code: int32(val)},
+		},
+	}
+	resp, err := client.Echo(context.Background(), req)
+
+	if resp != nil {
+		t.Errorf("Echo() = %v, wanted error %d", resp, val)
+	}
+	status, _ := status.FromError(err)
+	if status.Code() != val {
+		t.Errorf("Echo() errors with %d, want %d", status.Code(), val)
+	}
+}
+
+func TestExpand(t *testing.T) {
+	t.Parallel()
+	content := "The rain in Spain stays mainly on the plain!"
+	req := &genprotopb.ExpandRequest{Content: content}
+	s, err := client.Expand(context.Background(), req)
+	if err != nil {
+		t.Fatal(err)
+	}
+	resps := []string{}
+	for {
+		resp, err := s.Recv()
+		if err == io.EOF {
+			break
+		}
+		if err != nil {
+			t.Fatal(err)
+		}
+		resps = append(resps, resp.GetContent())
+	}
+	got := strings.Join(resps, " ")
+	if content != got {
+		t.Errorf("Expand() = %q, want %q", got, content)
+	}
+}
+
+func TestCollect(t *testing.T) {
+	t.Parallel()
+	content := "The rain in Spain stays mainly on the plain!"
+	s, err := client.Collect(context.Background())
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	for _, str := range strings.Split(content, " ") {
+		s.Send(&genprotopb.EchoRequest{
+			Response: &genprotopb.EchoRequest_Content{Content: str}})
+	}
+
+	resp, err := s.CloseAndRecv()
+	if err != nil {
+		t.Fatal(err)
+	}
+	if content != resp.GetContent() {
+		t.Errorf("Collect() = %q, want %q", resp.GetContent(), content)
+	}
+}
+
+func TestChat(t *testing.T) {
+	t.Parallel()
+	content := "The rain in Spain stays mainly on the plain!"
+	s, err := client.Chat(context.Background())
+	if err != nil {
+		t.Fatal(err)
+	}
+	for _, str := range strings.Split(content, " ") {
+		s.Send(&genprotopb.EchoRequest{
+			Response: &genprotopb.EchoRequest_Content{Content: str}})
+	}
+	s.CloseSend()
+	resps := []string{}
+	for {
+		resp, err := s.Recv()
+		if err == io.EOF {
+			break
+		}
+		if err != nil {
+			t.Fatal(err)
+		}
+		resps = append(resps, resp.GetContent())
+	}
+	got := strings.Join(resps, " ")
+	if content != got {
+		t.Errorf("Chat() = %q, want %q", got, content)
+	}
+}
+
+func TestWait(t *testing.T) {
+	t.Parallel()
+	content := "hello world!"
+	req := &genprotopb.WaitRequest{
+		End: &genprotopb.WaitRequest_Ttl{
+			Ttl: &durationpb.Duration{Nanos: 100},
+		},
+		Response: &genprotopb.WaitRequest_Success{
+			Success: &genprotopb.WaitResponse{Content: content},
+		},
+	}
+	op, err := client.Wait(context.Background(), req)
+	if err != nil {
+		t.Fatal(err)
+	}
+	resp, err := op.Wait(context.Background())
+	if err != nil {
+		t.Fatal(err)
+	}
+	if resp.GetContent() != content {
+		t.Errorf("Wait() = %q, want %q", resp.GetContent(), content)
+	}
+}
+
+func TestWait_timeout(t *testing.T) {
+	t.Parallel()
+	content := "hello world!"
+	req := &genprotopb.WaitRequest{
+		End: &genprotopb.WaitRequest_Ttl{
+			Ttl: &durationpb.Duration{Seconds: 1},
+		},
+		Response: &genprotopb.WaitRequest_Success{
+			Success: &genprotopb.WaitResponse{Content: content},
+		},
+	}
+	ctx, _ := context.WithTimeout(context.Background(), 1*time.Millisecond)
+	resp, err := client.Wait(ctx, req)
+
+	if err == nil {
+		t.Errorf("Wait() = %v, want error", resp)
+	}
+}
+
+func TestPagination(t *testing.T) {
+	t.Parallel()
+	str := "foo bar biz baz"
+	expected := strings.Split(str, " ")
+	req := &genprotopb.PagedExpandRequest{Content: str, PageSize: 2}
+	iter := client.PagedExpand(context.Background(), req)
+
+	ndx := 0
+	for {
+		resp, err := iter.Next()
+		if err == iterator.Done {
+			break
+		}
+		if err != nil {
+			t.Fatal(err)
+		}
+		if resp.GetContent() != expected[ndx] {
+			t.Errorf("Chat() = %s, want %s", resp.GetContent(), expected[ndx])
+		}
+		ndx++
+	}
+}