Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
5df863c
test: remove --proxyquire-shim from common, bigquery, datastore, and dns
danieljbruce Oct 15, 2026
d2820c8
[Address CI errors] test: support function stubs and guard read-only …
danieljbruce Oct 19, 2026
0a61c5e
test: remove --proxyquire-shim from logging and pubsub packages
danieljbruce Oct 15, 2026
1b74f20
[Address CI errors] test: support function stubs and guard read-only …
danieljbruce Oct 19, 2026
3ab8240
[Address review comments] test(logging): use assert.rejects for promi…
danieljbruce Oct 19, 2026
f8fe217
refactor(test-utils): centralize proxyquire helper in google-test-uti…
danieljbruce Oct 20, 2026
c4635f4
Merge branch 'fix/remove-proxyquire-shim-core-dns-ds-bq' into fix/rem…
danieljbruce Oct 20, 2026
dd814a5
refactor(logging,pubsub): use centralized proxyquire from google-test…
danieljbruce Oct 20, 2026
c239d88
[Address CI errors] test(test-utils): use native Module.createRequire…
danieljbruce Oct 20, 2026
97552c5
Merge branch 'fix/remove-proxyquire-shim-core-dns-ds-bq' into fix/rem…
danieljbruce Oct 20, 2026
0933524
Merge remote-tracking branch 'upstream/main' into fix/remove-proxyqui…
danieljbruce Oct 27, 2026
31b82b9
[Address CI errors] fix(test-utils): remove precompile clean to avoid…
danieljbruce Oct 27, 2026
36f3c04
[Address CI errors] test(bigquery): avoid jobs.insert completion race…
danieljbruce Oct 27, 2026
c946661
Merge branch 'fix/remove-proxyquire-shim-core-dns-ds-bq' into fix/rem…
danieljbruce Oct 27, 2026
2d02efb
chore: merge main and use released google-test-utils@^0.4.0 without y…
danieljbruce Oct 29, 2026
beff05e
chore: merge base branch and use released google-test-utils@^0.4.0 wi…
danieljbruce Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
],
"scripts": {
"docs": "jsdoc -c .jsdoc.js",
"test": "node ../../bin/run-test.cjs --proxyquire-shim build/test",
"test": "node ../../bin/run-test.cjs build/test",
"prepare": "npm run compile",
"pretest": "npm run compile",
"compile": "tsc -p .",
Expand Down Expand Up @@ -57,6 +57,7 @@
"@types/tmp": "^0.2.6",
"c8": "^10.1.3",
"codecov": "^3.8.3",
"google-test-utils": "^0.4.0",
"gts": "^6.0.2",
"jsdoc": "^4.0.4",
"jsdoc-fresh": "^6.1.0",
Expand Down
3 changes: 2 additions & 1 deletion core/common/test/service-object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
import * as assert from 'assert';
import {describe, it, beforeEach, afterEach} from 'mocha';
import * as extend from 'extend';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
// eslint-disable-next-line import/namespace
import * as r from 'teeny-request';
import * as sinon from 'sinon';

Expand Down
2 changes: 1 addition & 1 deletion core/common/test/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as assert from 'assert';
import {describe, it, before, beforeEach, after} from 'mocha';
import * as extend from 'extend';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import {Request} from 'teeny-request';
import {AuthClient, GoogleAuth, OAuth2Client} from 'google-auth-library';

Expand Down
2 changes: 1 addition & 1 deletion core/common/test/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
OAuth2Client,
} from 'google-auth-library';
import * as nock from 'nock';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import * as retryRequest from 'retry-request';
import * as sinon from 'sinon';
import * as stream from 'stream';
Expand Down
3 changes: 2 additions & 1 deletion handwritten/bigquery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"docs": "jsdoc -c .jsdoc.js",
"lint": "gts check",
"samples-test": "cd samples/ && pnpm link ../ && pnpm test && cd ../",
"test": "node ../../bin/run-test.cjs --proxyquire-shim build/test",
"test": "node ../../bin/run-test.cjs build/test",
"system-test": "node ../../bin/run-test.cjs build/system-test --timeout 600000",
"presystem-test": "pnpm run compile",
"clean": "gts clean",
Expand Down Expand Up @@ -91,6 +91,7 @@
"codecov": "^3.8.3",
"discovery-tsd": "^0.3.0",
"eslint-plugin-prettier": "^5.2.6",
"google-test-utils": "^0.4.0",
"gts": "^6.0.2",
"jsdoc": "^4.0.4",
"jsdoc-fresh": "^6.1.0",
Expand Down
3 changes: 2 additions & 1 deletion handwritten/bigquery/system-test/arrow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,8 @@ describe('Arrow Query Results', () => {

it('should raise the same error as query() when a jobs.insert query fails during execution', async () => {
const failingQuery = {
query: 'SELECT 1 / 0',
query:
'DECLARE n INT64 DEFAULT 50; SELECT 1 / (x - 50) FROM UNNEST(GENERATE_ARRAY(1, n)) AS x ORDER BY x;',
jobTimeoutMs: 60000,
useQueryCache: false,
};
Expand Down
2 changes: 1 addition & 1 deletion handwritten/bigquery/test/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import * as assert from 'assert';
import {describe, it, after, afterEach, before, beforeEach} from 'mocha';
import * as Big from 'big.js';
import * as extend from 'extend';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import * as sinon from 'sinon';
import * as crypto from 'crypto';

Expand Down
2 changes: 1 addition & 1 deletion handwritten/bigquery/test/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as pfy from '@google-cloud/promisify';
import * as assert from 'assert';
import {describe, it, before, beforeEach} from 'mocha';
import * as extend from 'extend';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';

import * as _root from '../src';
import {toArray} from '../src/util';
Expand Down
2 changes: 1 addition & 1 deletion handwritten/bigquery/test/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {DecorateRequestOptions, util} from '@google-cloud/common';
import * as pfy from '@google-cloud/promisify';
import * as assert from 'assert';
import {describe, it, beforeEach, afterEach, before} from 'mocha';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import * as sinon from 'sinon';

import {BigQuery} from '../src/bigquery';
Expand Down
2 changes: 1 addition & 1 deletion handwritten/bigquery/test/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as assert from 'assert';
import {describe, it, before, beforeEach, afterEach} from 'mocha';
import * as sinon from 'sinon';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import * as pfy from '@google-cloud/promisify';
import {EventEmitter} from 'events';
import {JobOptions} from '../src/job';
Expand Down
2 changes: 1 addition & 1 deletion handwritten/bigquery/test/routine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import * as pfy from '@google-cloud/promisify';
import * as assert from 'assert';
import {describe, it, before, beforeEach} from 'mocha';
import * as extend from 'extend';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';

import * as _root from '../src';

Expand Down
2 changes: 1 addition & 1 deletion handwritten/bigquery/test/rowQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {util} from '@google-cloud/common';
import * as assert from 'assert';
import {describe, it, before, beforeEach, afterEach} from 'mocha';
import {Duplex, Stream} from 'stream';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import * as sinon from 'sinon';
import * as q from '../src/rowQueue';
import * as t from '../src/table';
Expand Down
2 changes: 1 addition & 1 deletion handwritten/bigquery/test/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {describe, it, afterEach, beforeEach, before, after} from 'mocha';
import * as Big from 'big.js';
import {EventEmitter} from 'events';
import * as extend from 'extend';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import * as sinon from 'sinon';
import * as stream from 'stream';
import * as crypto from 'crypto';
Expand Down
3 changes: 2 additions & 1 deletion handwritten/datastore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"presystem-test": "npm run compile",
"system-test": "node ../../bin/run-test.cjs build/system-test --timeout 600000",
"pretest": "npm run compile",
"test": "node ../../bin/run-test.cjs --proxyquire-shim build/test",
"test": "node ../../bin/run-test.cjs build/test",
"precompile": "gts clean"
},
"dependencies": {
Expand Down Expand Up @@ -68,6 +68,7 @@
"async": "^3.2.6",
"c8": "^10.1.3",
"gapic-tools": "^2.2.0",
"google-test-utils": "^0.4.0",
"gts": "^6.0.2",
"js-yaml": "^4.1.0",
"jsdoc": "^4.0.4",
Expand Down
2 changes: 1 addition & 1 deletion handwritten/datastore/system-test/transaction-spy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import {DatastoreRequest} from '../src';
import {RequestCallback, RequestConfig} from '../src/request';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
DatastoreOptions,
} from '../../src';
import * as assert from 'assert';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import {Callback, CallOptions} from 'google-gax';
import * as protos from '../../src/protos';
import * as ds from '../../src';
Expand Down
2 changes: 1 addition & 1 deletion handwritten/datastore/test/index-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as promisify from '@google-cloud/promisify';
import * as assert from 'assert';
import {before, beforeEach, describe, it} from 'mocha';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';

import * as ds from '../src';

Expand Down
2 changes: 1 addition & 1 deletion handwritten/datastore/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as assert from 'assert';
import {before, beforeEach, after, afterEach, describe, it} from 'mocha';
import * as gax from 'google-gax';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import {PassThrough, Readable} from 'stream';

import * as ds from '../src';
Expand Down
2 changes: 1 addition & 1 deletion handwritten/datastore/test/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {after, afterEach, before, beforeEach, describe, it} from 'mocha';
import * as extend from 'extend';
import * as gax from 'google-gax';
import * as is from 'is';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import * as sinon from 'sinon';
import {PassThrough, Transform} from 'stream';

Expand Down
2 changes: 1 addition & 1 deletion handwritten/datastore/test/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import * as pfy from '@google-cloud/promisify';
import arrify = require('arrify');
import * as assert from 'assert';
import {afterEach, beforeEach, before, describe, it} from 'mocha';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import {
Datastore,
DatastoreOptions,
Expand Down
3 changes: 2 additions & 1 deletion handwritten/google-cloud-dns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"scripts": {
"docs": "jsdoc -c .jsdoc.js",
"lint": "gts check",
"test": "node ../../bin/run-test.cjs --proxyquire-shim build/test",
"test": "node ../../bin/run-test.cjs build/test",
"samples-test": "pnpm run compile && cd samples/ && pnpm link ../ && pnpm i && pnpm test",
"presystem-test": "pnpm run compile",
"system-test": "pnpm run compile && node ../../bin/run-test.cjs build/system-test",
Expand Down Expand Up @@ -64,6 +64,7 @@
"@types/tmp": "^0.2.6",
"c8": "^10.1.3",
"codecov": "^3.8.3",
"google-test-utils": "^0.4.0",
"gts": "^6.0.2",
"jsdoc": "^4.0.4",
"jsdoc-fresh": "^6.1.0",
Expand Down
6 changes: 3 additions & 3 deletions handwritten/google-cloud-dns/test/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import * as promisify from '@google-cloud/promisify';
import * as assert from 'assert';
import {describe, it, before, beforeEach} from 'mocha';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import {Change} from '../src/change';

let promisified = false;
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('Change', () => {
assert.strictEqual(change, null);
assert.strictEqual(apiResponse_, apiResponse);
done();
}
},
);
});
});
Expand All @@ -145,7 +145,7 @@ describe('Change', () => {
assert.strictEqual(change_, change);
assert.strictEqual(apiResponse_, apiResponse);
done();
}
},
);
});

Expand Down
18 changes: 9 additions & 9 deletions handwritten/google-cloud-dns/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as promisify from '@google-cloud/promisify';
import arrify = require('arrify');
import * as assert from 'assert';
import {describe, it, before, beforeEach} from 'mocha';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';
import {CoreOptions, OptionsWithUri, Response} from 'request';

import {Zone} from '../src';
Expand Down Expand Up @@ -135,7 +135,7 @@ describe('DNS', () => {
assert.deepStrictEqual(
calledWith.packageJson,
// eslint-disable-next-line @typescript-eslint/no-var-requires
require('../../package.json')
require('../../package.json'),
);
});

Expand Down Expand Up @@ -226,7 +226,7 @@ describe('DNS', () => {
assert.strictEqual(zone, null);
assert.strictEqual(apiResponse_, apiResponse);
done();
}
},
);
});
});
Expand Down Expand Up @@ -265,7 +265,7 @@ describe('DNS', () => {
assert.strictEqual(apiResponse_, apiResponse);

done();
}
},
);
});

Expand Down Expand Up @@ -318,15 +318,15 @@ describe('DNS', () => {
err: Error,
zones: Zone[],
nextQuery: {},
apiResponse_: Response
apiResponse_: Response,
) => {
assert.strictEqual(err, error);
assert.strictEqual(zones, null);
assert.strictEqual(nextQuery, null);
assert.strictEqual(apiResponse_, apiResponse);

done();
}
},
);
});
});
Expand Down Expand Up @@ -377,7 +377,7 @@ describe('DNS', () => {
nextQuery,
Object.assign({}, query, {
pageToken: apiResponseWithNextPageToken.nextPageToken,
})
}),
);

done();
Expand All @@ -391,15 +391,15 @@ describe('DNS', () => {
err: Error,
zones: Zone[],
nextQuery: {},
apiResponse_: Response
apiResponse_: Response,
) => {
assert.ifError(err);
assert.strictEqual(zones[0], zone);
assert.strictEqual(nextQuery, null);
assert.strictEqual(apiResponse_, apiResponse);

done();
}
},
);
});

Expand Down
2 changes: 1 addition & 1 deletion handwritten/google-cloud-dns/test/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import * as promisify from '@google-cloud/promisify';
import * as assert from 'assert';
import {describe, it, before, beforeEach} from 'mocha';
import * as proxyquire from 'proxyquire';
import {proxyquire} from 'google-test-utils';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {Record} from '../src';
Expand Down
Loading
Loading