Skip to content

Commit 031f71f

Browse files
Shabirmeangcf-owl-bot[bot]
authored andcommitted
docs(samples): add usage samples to show handling of LRO response Operation (#519)
* improvements: add samples * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: add tests for the samples * fix: merge conflict * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * cleanup: rearrange region tags * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: replace beforeEach with before * fix: failing test cases * cleanup: rearrange code lines * test: fix the timeout and race issues in tests * cleanup: rename fn * fix: mocha test definition * cleanup: change console log * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: failing test due package * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: linting errors * fix: add netowkr as arg * lint: fix test js * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: add ci network to test * cleanup: ammend as per PR comments * cleanup: remove unused dep * fix: test case * doc: add explanation to the test util file * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * doc: fix typos * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * lint: fix errors * fix: move after block Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 5d168f7 commit 031f71f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

container/snippets/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
"*.js"
1212
],
1313
"scripts": {
14-
"test": "mocha system-test --timeout 10000"
14+
"test": "mocha system-test --timeout 1000000"
1515
},
1616
"dependencies": {
17-
"@google-cloud/container": "^2.6.0"
17+
"@google-cloud/container": "^2.6.0",
18+
"uuid": "^8.3.2"
1819
},
1920
"devDependencies": {
2021
"chai": "^4.2.0",

container/snippets/quickstart.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
'use strict';
1616

17+
// [START gke_list_cluster]
1718
async function main() {
1819
// [START container_quickstart]
1920
const container = require('@google-cloud/container');
@@ -30,11 +31,11 @@ async function main() {
3031
};
3132

3233
const [response] = await client.listClusters(request);
33-
console.log('Clusters:');
34-
console.log(response);
34+
console.log('Clusters: ', response);
3535
}
3636
quickstart();
3737
// [END container_quickstart]
3838
}
3939

4040
main().catch(console.error);
41+
// [END gke_list_cluster]

container/snippets/system-test/sample.test.js renamed to container/snippets/system-test/quicktest.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const cp = require('child_process');
2020

2121
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2222

23-
describe('container samples', () => {
23+
describe('container samples - quickstart', () => {
2424
it('should run the quickstart', async () => {
2525
const stdout = execSync('node quickstart');
2626
assert.match(stdout, /Clusters:/);

0 commit comments

Comments
 (0)