Skip to content

Instantly share code, notes, and snippets.

Avatar

Stephen stephenplusplus

View GitHub Profile
View logging-issue-943.js
const assert = require('assert');
const Logging = require('@google-cloud/logging').Logging;
const v4 = require('uuid').v4;
const TESTS_PREFIX = 'issue-943';
const TIME_TEST_STARTED = new Date().toISOString();
const NUM_LOGS_TO_CREATE = 50;
const NUM_ENTRIES_TO_WRITE = 100000;
const FLUSH_AFTER_NUM_LOGS_FILLED = NUM_LOGS_TO_CREATE / 10;
View compute-pr-522.diff
diff --git a/system-test/compute.js b/system-test/compute.js
index 5dbc948..daefd4b 100644
--- a/system-test/compute.js
+++ b/system-test/compute.js
@@ -20,7 +20,6 @@ const uuid = require('uuid');
const {promisify} = require('util');
const Compute = require('../');
-const {execSync} = require('child_process');
View compute-pr-500.diff
diff --git a/test/zone.js b/test/zone.js
index 456ed28..6c03fd6 100644
--- a/test/zone.js
+++ b/test/zone.js
@@ -775,6 +775,24 @@ describe('Zone', () => {
],
};
+ describe('config.template', () => {
+ const CONFIG = {
View storage-1135.diff
diff --git a/test/bucket.ts b/test/bucket.ts
index be5b013..51e653b 100644
--- a/test/bucket.ts
+++ b/test/bucket.ts
@@ -21,6 +21,8 @@ import {
} from '@google-cloud/common';
import arrify = require('arrify');
import * as assert from 'assert';
+import * as extend from 'extend';
+import * as fs from 'fs';
View diff.diff
diff --git a/src/table.ts b/src/table.ts
index cbe2d59..e900829 100644
--- a/src/table.ts
+++ b/src/table.ts
@@ -1102,20 +1102,16 @@ class Table extends common.ServiceObject {
this.bigQuery.createJob(body, callback!);
}
- createLoadJob(source: string, metadata?: JobLoadMetadata): Writable;
- createLoadJob(source: File, metadata?: JobLoadMetadata): Promise<JobResponse>;
View index.js
'use strict'
const express = require('express')
const {Storage} = require('@google-cloud/storage')
const app = express()
app.get('*', async (req, res) => {
const gcs = new Storage()
try {
View package.json
{
"name": "gissue-506",
"version": "1.0.0",
"scripts": {
"test": "node ./test.js"
},
"dependencies": {
"@google-cloud/bigtable": "^2.0.1",
"p-queue": "^6.0.2",
"uuid": "^3.0.1"
View package.json
{
"name": "gissue-763",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "node ./test.js"
},
"keywords": [],
"author": "",
@stephenplusplus
stephenplusplus / index.js
Last active Jul 3, 2019
split-array-stream Potential Evolution
View index.js
const {Readable, Transform} = require('stream');
// SplitArrayStream can be used two ways:
//
// - An intermediary stream that receives arrays and emits its items
// - A source stream that takes a function as an argument, that is expected to
// return an array each time it is called
//
// In both cases, an array is only asked for when the destination stream is
// ready.
@stephenplusplus
stephenplusplus / index.js
Created May 6, 2019
@google-cloud/storage Issue 674
View index.js
'use strict'
const fs = require('fs-extra')
const {Storage} = require('@google-cloud/storage')
const gcs = new Storage()
const bucket = gcs.bucket(process.env.BUCKET_NAME)
const tmpFilePath = './tmp-file'
const tmpItemFilePath = './tmp-item-file'
You can’t perform that action at this time.