This repository was archived by the owner on Mar 11, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7676 "google-proto-files" : " ^0.17.0" ,
7777 "is" : " ^3.2.1" ,
7878 "lodash.merge" : " ^4.6.1" ,
79+ "nock" : " ^10.0.1" ,
7980 "protobufjs" : " ^6.8.8" ,
8081 "pumpify" : " ^1.5.1" ,
8182 "snakecase-keys" : " ^1.2.0" ,
Original file line number Diff line number Diff line change @@ -22,12 +22,19 @@ const BigQuery = require('@google-cloud/bigquery');
2222const exec = require ( 'methmeth' ) ;
2323const extend = require ( 'extend' ) ;
2424const is = require ( 'is' ) ;
25+ const nock = require ( 'nock' ) ;
2526const PubSub = require ( '@google-cloud/pubsub' ) ;
2627const { Storage} = require ( '@google-cloud/storage' ) ;
2728const uuid = require ( 'uuid' ) ;
2829
2930const { Logging} = require ( '../' ) ;
3031
32+ // block all attempts to chat with the metadata server (kokoro runs on GCE)
33+ nock ( 'http://metadata.google.internal' )
34+ . get ( ( ) => true )
35+ . replyWithError ( { code : 'ENOTFOUND' } )
36+ . persist ( ) ;
37+
3138describe ( 'Logging' , ( ) => {
3239 let PROJECT_ID ;
3340 const TESTS_PREFIX = 'gcloud-logging-test' ;
You can’t perform that action at this time.
0 commit comments