-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add docker test * format * typo * feedback * use tagged docker name * feedbac
- Loading branch information
1 parent
2ae6f8a
commit 79deccc
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,4 @@ pbjs-genfiles/ | |
*test-out* | ||
docker/package.tgz | ||
*.tgz | ||
.showcase-typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
### Test script pulling the docker image and use it against showcase proto. | ||
|
||
# Docker image tag: gapic-generator-typescript:latest. | ||
DIR_NAME=.showcase-typescript | ||
# Remove test directory if it already exists | ||
rm -rf $DIR_NAME | ||
# Create new directory showcase-typescript. | ||
mkdir $DIR_NAME | ||
# Use Docker Image for generating showcase client library | ||
docker run --rm \ | ||
--mount type=bind,source=`pwd`/typescript/test/protos/google/showcase/v1beta1,destination=/in/typescript/test/protos/google/showcase/v1beta1,readonly \ | ||
--mount type=bind,source=`pwd`/$DIR_NAME,destination=/out \ | ||
gapic-generator-typescript:latest | ||
# Test generated client library | ||
cd $DIR_NAME | ||
npm install # install dependencies | ||
npm run fix # format the code | ||
npm test # run unit tests | ||
|
||
# Test succeed | ||
echo 'docker test succeeded! ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters