Skip to content

Commit

Permalink
updated FQDN's to googleapis.com with a trailing dot (#2214)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericuldall authored and callmehiphop committed Apr 14, 2017
1 parent 6622fbd commit 13d4ed5
Show file tree
Hide file tree
Showing 45 changed files with 64 additions and 61 deletions.
2 changes: 1 addition & 1 deletion packages/bigquery/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function BigQuery(options) {
}

var config = {
baseUrl: 'https://www.googleapis.com/bigquery/v2',
baseUrl: 'https://www.googleapis.com./bigquery/v2',
scopes: ['https://www.googleapis.com/auth/bigquery'],
packageJson: require('../package.json')
};
Expand Down
2 changes: 1 addition & 1 deletion packages/bigquery/src/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ Table.prototype.createWriteStream = function(metadata) {
},
request: {
uri: format('{base}/{projectId}/jobs', {
base: 'https://www.googleapis.com/upload/bigquery/v2/projects',
base: 'https://www.googleapis.com./upload/bigquery/v2/projects',
projectId: self.bigQuery.projectId
})
}
Expand Down
2 changes: 1 addition & 1 deletion packages/bigquery/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('BigQuery', function() {

var calledWith = bq.calledWith_[0];

var baseUrl = 'https://www.googleapis.com/bigquery/v2';
var baseUrl = 'https://www.googleapis.com./bigquery/v2';
assert.strictEqual(calledWith.baseUrl, baseUrl);
assert.deepEqual(calledWith.scopes, [
'https://www.googleapis.com/auth/bigquery'
Expand Down
2 changes: 1 addition & 1 deletion packages/bigquery/test/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ describe('BigQuery/Table', function() {

it('should pass the correct request uri', function(done) {
makeWritableStreamOverride = function(stream, options) {
var uri = 'https://www.googleapis.com/upload/bigquery/v2/projects/' +
var uri = 'https://www.googleapis.com./upload/bigquery/v2/projects/' +
table.bigQuery.projectId + '/jobs';
assert.equal(options.request.uri, uri);
done();
Expand Down
4 changes: 2 additions & 2 deletions packages/bigtable/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ function Bigtable(options) {
return new Bigtable(options);
}

var baseUrl = 'bigtable.googleapis.com';
var adminBaseUrl = 'bigtableadmin.googleapis.com';
var baseUrl = 'bigtable.googleapis.com.';
var adminBaseUrl = 'bigtableadmin.googleapis.com.';

var customEndpoint = options.apiEndpoint ||
process.env.BIGTABLE_EMULATOR_HOST;
Expand Down
8 changes: 4 additions & 4 deletions packages/bigtable/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,28 +136,28 @@ describe('Bigtable', function() {

var calledWith = bigtable.calledWith_[0];

assert.strictEqual(calledWith.baseUrl, 'bigtable.googleapis.com');
assert.strictEqual(calledWith.baseUrl, 'bigtable.googleapis.com.');
assert.strictEqual(calledWith.service, 'bigtable');
assert.strictEqual(calledWith.apiVersion, 'v2');
assert.strictEqual(calledWith.customEndpoint, false);

assert.deepEqual(calledWith.protoServices, {
Bigtable: googleProtoFiles('bigtable/v2/bigtable.proto'),
BigtableTableAdmin: {
baseUrl: 'bigtableadmin.googleapis.com',
baseUrl: 'bigtableadmin.googleapis.com.',
path: googleProtoFiles(
'bigtable/admin/v2/bigtable_table_admin.proto'),
service: 'bigtable.admin'
},
BigtableInstanceAdmin: {
baseUrl: 'bigtableadmin.googleapis.com',
baseUrl: 'bigtableadmin.googleapis.com.',
path: googleProtoFiles(
'bigtable/admin/v2/bigtable_instance_admin.proto'
),
service: 'bigtable.admin'
},
Operations: {
baseUrl: 'bigtableadmin.googleapis.com',
baseUrl: 'bigtableadmin.googleapis.com.',
path: googleProtoFiles('longrunning/operations.proto'),
service: 'longrunning',
apiVersion: 'v1'
Expand Down
4 changes: 2 additions & 2 deletions packages/common-grpc/test/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ describe('GrpcService', function() {
});

it('should store the baseUrl properly', function() {
var fakeBaseUrl = 'a.googleapis.com';
var fakeBaseUrl = 'a.googleapis.com.';

grpcLoadOverride = function() {
return MOCK_GRPC_API;
Expand Down Expand Up @@ -1914,7 +1914,7 @@ describe('GrpcService', function() {
});

it('should use the baseUrl override if applicable', function() {
var fakeBaseUrl = 'a.googleapis.com';
var fakeBaseUrl = 'a.googleapis.com.';
var fakeService = {};

grpcService.protos = {
Expand Down
2 changes: 1 addition & 1 deletion packages/compute/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function Compute(options) {
}

var config = {
baseUrl: 'https://www.googleapis.com/compute/v1',
baseUrl: 'https://www.googleapis.com./compute/v1',
scopes: ['https://www.googleapis.com/auth/compute'],
packageJson: require('../package.json')
};
Expand Down
2 changes: 1 addition & 1 deletion packages/compute/src/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Service.prototype.delete = function(callback) {
Service.prototype.getHealth = function(group, callback) {
if (!is.string(group)) {
group = format('{baseUrl}/projects/{p}/zones/{z}/instanceGroups/{n}', {
baseUrl: 'https://www.googleapis.com/compute/v1',
baseUrl: 'https://www.googleapis.com./compute/v1',
p: this.parent.projectId,
z: group.zone.name || group.zone,
n: group.name
Expand Down
2 changes: 1 addition & 1 deletion packages/compute/src/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function VM(zone, name) {
this.waiters = [];

this.url = format('{base}/{project}/zones/{zone}/instances/{name}', {
base: 'https://www.googleapis.com/compute/v1/projects',
base: 'https://www.googleapis.com./compute/v1/projects',
project: zone.compute.projectId,
zone: zone.name,
name: this.name
Expand Down
4 changes: 2 additions & 2 deletions packages/compute/src/zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Zone.prototype.createAutoscaler = function(name, config, callback) {

if (!/^https*:/.test(json.target)) {
json.target = [
'https://content.googleapis.com/compute/v1/projects/',
'https://content.googleapis.com./compute/v1/projects/',
this.compute.projectId,
'/zones/',
this.name,
Expand Down Expand Up @@ -554,7 +554,7 @@ Zone.prototype.createInstanceGroup = function(name, options, callback) {
* boot: true,
* initializeParams: {
* sourceImage:
* 'https://www.googleapis.com/compute/v1/projects' +
* 'https://www.googleapis.com./compute/v1/projects' +
* '/debian-cloud/global/images/debian-7-wheezy-v20150710'
* }
* }
Expand Down
2 changes: 1 addition & 1 deletion packages/compute/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('Compute', function() {

var calledWith = compute.calledWith_[0];

var baseUrl = 'https://www.googleapis.com/compute/v1';
var baseUrl = 'https://www.googleapis.com./compute/v1';
assert.strictEqual(calledWith.baseUrl, baseUrl);
assert.deepEqual(calledWith.scopes, [
'https://www.googleapis.com/auth/compute'
Expand Down
4 changes: 2 additions & 2 deletions packages/compute/test/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('Service', function() {
service.request = function(reqOpts) {
assert.deepEqual(reqOpts.json, {
group: [
'https://www.googleapis.com/compute/v1/projects/',
'https://www.googleapis.com./compute/v1/projects/',
COMPUTE.projectId,
'/zones/',
group.zone,
Expand All @@ -232,7 +232,7 @@ describe('Service', function() {
service.request = function(reqOpts) {
assert.deepEqual(reqOpts.json, {
group: [
'https://www.googleapis.com/compute/v1/projects/',
'https://www.googleapis.com./compute/v1/projects/',
COMPUTE.projectId,
'/zones/',
group.zone.name,
Expand Down
2 changes: 1 addition & 1 deletion packages/compute/test/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('VM', function() {

it('should localize the URL of the VM', function() {
assert.strictEqual(vm.url, [
'https://www.googleapis.com/compute/v1/projects',
'https://www.googleapis.com./compute/v1/projects',
COMPUTE.projectId,
'zones',
ZONE.name,
Expand Down
2 changes: 1 addition & 1 deletion packages/compute/test/zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ describe('Zone', function() {

zone.request = function(reqOpts) {
var expectedTarget = [
'https://content.googleapis.com/compute/v1/projects/',
'https://content.googleapis.com./compute/v1/projects/',
COMPUTE.projectId,
'/zones/',
zone.name,
Expand Down
2 changes: 1 addition & 1 deletion packages/datastore/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function Datastore(options) {
return new Datastore(options);
}

this.defaultBaseUrl_ = 'datastore.googleapis.com';
this.defaultBaseUrl_ = 'datastore.googleapis.com.';
this.determineBaseUrl_(options.apiEndpoint);

this.namespace = options.namespace;
Expand Down
2 changes: 1 addition & 1 deletion packages/datastore/src/v1/datastore_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,4 +500,4 @@ function DatastoreClientBuilder(gaxGrpc) {
}
module.exports = DatastoreClientBuilder;
module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS;
module.exports.ALL_SCOPES = ALL_SCOPES;
module.exports.ALL_SCOPES = ALL_SCOPES;
5 changes: 4 additions & 1 deletion packages/datastore/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ describe('Datastore', function() {
});

it('should set the default base URL', function() {
assert.strictEqual(datastore.defaultBaseUrl_, 'datastore.googleapis.com');
assert.strictEqual(
datastore.defaultBaseUrl_,
'datastore.googleapis.com.'
);
});

it('should set default API connection details', function(done) {
Expand Down
2 changes: 1 addition & 1 deletion packages/dns/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function DNS(options) {
}

var config = {
baseUrl: 'https://www.googleapis.com/dns/v1',
baseUrl: 'https://www.googleapis.com./dns/v1',
scopes: [
'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
'https://www.googleapis.com/auth/cloud-platform'
Expand Down
2 changes: 1 addition & 1 deletion packages/dns/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('DNS', function() {

var calledWith = dns.calledWith_[0];

var baseUrl = 'https://www.googleapis.com/dns/v1';
var baseUrl = 'https://www.googleapis.com./dns/v1';
assert.strictEqual(calledWith.baseUrl, baseUrl);
assert.deepEqual(calledWith.scopes, [
'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
Expand Down
4 changes: 2 additions & 2 deletions packages/error-reporting/src/google-apis/auth-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var isString = is.string;
var SCOPES = ['https://www.googleapis.com/auth/cloud-platform'];

/* @const {String} Base Error Reporting API */
var API = 'https://clouderrorreporting.googleapis.com/v1beta1/projects';
var API = 'https://clouderrorreporting.googleapis.com./v1beta1/projects';

/**
* The RequestHandler constructor initializes several properties on the
Expand Down Expand Up @@ -90,7 +90,7 @@ class RequestHandler extends common.Service {
var pid = config.getProjectId();
super({
packageJson: pkg,
baseUrl: 'https://clouderrorreporting.googleapis.com/v1beta1/',
baseUrl: 'https://clouderrorreporting.googleapis.com./v1beta1/',
scopes: SCOPES,
projectId: pid !== null ? pid : undefined,
projectIdRequired: true
Expand Down
4 changes: 2 additions & 2 deletions packages/error-reporting/system-test/testAuthClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ const TEST_RUNNER = (function() {
beforeEach(function() {
env.setProjectId().setKeyFilename().setProduction();
fakeService = nock(
'https://clouderrorreporting.googleapis.com/v1beta1/projects/' +
env.projectId
'https://clouderrorreporting.googleapis.com./v1beta1/projects/' +
process.env.GCLOUD_PROJECT
).persist().post('/events:report');
logger = createLogger({logLevel: 5});
client = new RequestHandler(
Expand Down
4 changes: 2 additions & 2 deletions packages/language/src/v1/language_service_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var configData = require('./language_service_client_config');
var extend = require('extend');
var gax = require('google-gax');

var SERVICE_ADDRESS = 'language.googleapis.com';
var SERVICE_ADDRESS = 'language.googleapis.com.';

var DEFAULT_SERVICE_PORT = 443;

Expand Down Expand Up @@ -369,4 +369,4 @@ function LanguageServiceClientBuilder(gaxGrpc) {
}
module.exports = LanguageServiceClientBuilder;
module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS;
module.exports.ALL_SCOPES = ALL_SCOPES;
module.exports.ALL_SCOPES = ALL_SCOPES;
4 changes: 2 additions & 2 deletions packages/language/src/v1beta2/language_service_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var configData = require('./language_service_client_config');
var extend = require('extend');
var gax = require('google-gax');

var SERVICE_ADDRESS = 'language.googleapis.com';
var SERVICE_ADDRESS = 'language.googleapis.com.';

var DEFAULT_SERVICE_PORT = 443;

Expand Down Expand Up @@ -426,4 +426,4 @@ function LanguageServiceClientBuilder(gaxGrpc) {
}
module.exports = LanguageServiceClientBuilder;
module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS;
module.exports.ALL_SCOPES = ALL_SCOPES;
module.exports.ALL_SCOPES = ALL_SCOPES;
2 changes: 1 addition & 1 deletion packages/logging/src/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ Log.prototype.warning = function(entry, options, callback) {
* //-
* // You may also pass multiple log entries to write.
* //-
* var secondEntry = log.entry('compute.googleapis.com', {
* var secondEntry = log.entry('gce_instance', {
* user: 'my_username'
* });
*
Expand Down
2 changes: 1 addition & 1 deletion packages/logging/src/v2/config_service_v2_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,4 +602,4 @@ function ConfigServiceV2ClientBuilder(gaxGrpc) {
}
module.exports = ConfigServiceV2ClientBuilder;
module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS;
module.exports.ALL_SCOPES = ALL_SCOPES;
module.exports.ALL_SCOPES = ALL_SCOPES;
6 changes: 3 additions & 3 deletions packages/logging/src/v2/logging_service_v2_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ LoggingServiceV2Client.prototype.getProjectId = function(callback) {
*
* `[LOG_ID]` must be URL-encoded. For example,
* `"projects/my-project-id/logs/syslog"`,
* `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
* `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com.%2Factivity"`.
* For more information about log names, see
* {@link LogEntry}.
* @param {Object=} options
Expand Down Expand Up @@ -287,7 +287,7 @@ LoggingServiceV2Client.prototype.deleteLog = function(request, options, callback
*
* `[LOG_ID]` must be URL-encoded. For example,
* `"projects/my-project-id/logs/syslog"` or
* `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`.
* `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com.%2Factivity"`.
* For more information about log names, see
* {@link LogEntry}.
* @param {Object=} request.resource
Expand Down Expand Up @@ -835,4 +835,4 @@ function LoggingServiceV2ClientBuilder(gaxGrpc) {
}
module.exports = LoggingServiceV2ClientBuilder;
module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS;
module.exports.ALL_SCOPES = ALL_SCOPES;
module.exports.ALL_SCOPES = ALL_SCOPES;
2 changes: 1 addition & 1 deletion packages/logging/src/v2/metrics_service_v2_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,4 +555,4 @@ function MetricsServiceV2ClientBuilder(gaxGrpc) {
}
module.exports = MetricsServiceV2ClientBuilder;
module.exports.SERVICE_ADDRESS = SERVICE_ADDRESS;
module.exports.ALL_SCOPES = ALL_SCOPES;
module.exports.ALL_SCOPES = ALL_SCOPES;
2 changes: 1 addition & 1 deletion packages/prediction/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function Prediction(options) {
}

var config = {
baseUrl: 'https://www.googleapis.com/prediction/v1.6',
baseUrl: 'https://www.googleapis.com./prediction/v1.6',
scopes: [
'https://www.googleapis.com/auth/prediction',
'https://www.googleapis.com/auth/devstorage.read_only'
Expand Down
2 changes: 1 addition & 1 deletion packages/prediction/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('Prediction', function() {

var calledWith = prediction.calledWith_[0];

var baseUrl = 'https://www.googleapis.com/prediction/v1.6';
var baseUrl = 'https://www.googleapis.com./prediction/v1.6';
assert.strictEqual(calledWith.baseUrl, baseUrl);
assert.deepEqual(calledWith.scopes, [
'https://www.googleapis.com/auth/prediction',
Expand Down
2 changes: 1 addition & 1 deletion packages/pubsub/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function PubSub(options) {
return new PubSub(options);
}

this.defaultBaseUrl_ = 'pubsub.googleapis.com';
this.defaultBaseUrl_ = 'pubsub.googleapis.com.';
this.determineBaseUrl_();

var config = {
Expand Down
4 changes: 2 additions & 2 deletions packages/pubsub/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('PubSub', function() {

var calledWith = pubsub.calledWith_[0];

var baseUrl = 'pubsub.googleapis.com';
var baseUrl = 'pubsub.googleapis.com.';
assert.strictEqual(calledWith.baseUrl, baseUrl);
assert.strictEqual(calledWith.service, 'pubsub');
assert.strictEqual(calledWith.apiVersion, 'v1');
Expand All @@ -161,7 +161,7 @@ describe('PubSub', function() {
});

it('should set the defaultBaseUrl_', function() {
assert.strictEqual(pubsub.defaultBaseUrl_, 'pubsub.googleapis.com');
assert.strictEqual(pubsub.defaultBaseUrl_, 'pubsub.googleapis.com.');
});

it('should use the PUBSUB_EMULATOR_HOST env var', function() {
Expand Down
2 changes: 1 addition & 1 deletion packages/resource/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function Resource(options) {
}

var config = {
baseUrl: 'https://cloudresourcemanager.googleapis.com/v1',
baseUrl: 'https://cloudresourcemanager.googleapis.com./v1',
scopes: ['https://www.googleapis.com/auth/cloud-platform'],
projectIdRequired: false,
packageJson: require('../package.json')
Expand Down
Loading

0 comments on commit 13d4ed5

Please sign in to comment.