Skip to content

Commit 6f59a66

Browse files
authored
Transit cross account (#13)
1 parent a21e207 commit 6f59a66

File tree

4 files changed

+250
-65
lines changed

4 files changed

+250
-65
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ IBM Cloud services:
4242
Service Name | Import Path
4343
--- | ---
4444
[Direct Link](https://cloud.ibm.com/apidocs/direct_link?code=node) | ibm-networking-services/direct-link/v1
45-
[Transit Gateway](https://cloud.ibm.com/apidocs/transit-gateway?code=node) | ibm-networking-services/transit-gateway/v1
45+
[Transit Gateway](https://cloud.ibm.com/apidocs/transit-gateway?code=node) | ibm-networking-services/transit-gateway-apis/v1
4646

4747
## Prerequisites
4848
* You need an [IBM Cloud][ibm-cloud-onboarding] account.

test/integration/transit-gateway-apis.v1.test.js renamed to test/integration/transit-gateway.v1.test.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const TransitGatewayApisV1 = require('../../dist/transit-gateway/v1');
18+
const TransitGatewayApisV1 = require('../../dist/transit-gateway-apis/v1');
1919
const { IamAuthenticator } = require('ibm-cloud-sdk-core');
2020
const authHelper = require('../resources/auth-helper.js');
2121

@@ -130,7 +130,7 @@ describe('TransitGatewayApisV1', () => {
130130
test('should successfully wait for gateway to be created', async done => {
131131
try {
132132
const result = await poll(
133-
() => transitGateway.detailTransitGateway({ id: GATEWAY_INSTANCE_ID }),
133+
() => transitGateway.getTransitGateway({ id: GATEWAY_INSTANCE_ID }),
134134
result => result.status === 'available',
135135
50
136136
);
@@ -215,7 +215,7 @@ describe('TransitGatewayApisV1', () => {
215215
describe('Get Gateway By Id', () => {
216216
test('should successfully fetches the gateway by instance id', async done => {
217217
try {
218-
const response = await transitGateway.detailTransitGateway({ id: GATEWAY_INSTANCE_ID });
218+
const response = await transitGateway.getTransitGateway({ id: GATEWAY_INSTANCE_ID });
219219
expect(response).toBeDefined();
220220
expect(response.status).toEqual(200);
221221

@@ -231,7 +231,7 @@ describe('TransitGatewayApisV1', () => {
231231

232232
test('should fail to get gateway by instance id', async done => {
233233
try {
234-
await transitGateway.detailTransitGateway({ id: '111' });
234+
await transitGateway.getTransitGateway({ id: '111' });
235235
} catch (err) {
236236
expect(err.status).toEqual(404);
237237
expect(err.message).toEqual('The gateway was not found.');
@@ -273,7 +273,7 @@ describe('TransitGatewayApisV1', () => {
273273
try {
274274
const result = await poll(
275275
() =>
276-
transitGateway.detailTransitGatewayConnection({
276+
transitGateway.getTransitGatewayConnection({
277277
transitGatewayId: GATEWAY_INSTANCE_ID,
278278
id: CONN_INSTANCE_ID,
279279
}),
@@ -363,7 +363,7 @@ describe('TransitGatewayApisV1', () => {
363363
describe('List Transit Gateway Connection', () => {
364364
test('sucessfully get gateway connection by id', async done => {
365365
try {
366-
const response = await transitGateway.detailTransitGatewayConnection({
366+
const response = await transitGateway.getTransitGatewayConnection({
367367
transitGatewayId: GATEWAY_INSTANCE_ID,
368368
id: CONN_INSTANCE_ID,
369369
});
@@ -380,7 +380,7 @@ describe('TransitGatewayApisV1', () => {
380380

381381
test('fail to get gateway connection by instanceID', async done => {
382382
try {
383-
await transitGateway.detailTransitGatewayConnection({
383+
await transitGateway.getTransitGatewayConnection({
384384
transitGatewayId: '111',
385385
id: '111',
386386
});
@@ -413,7 +413,7 @@ describe('TransitGatewayApisV1', () => {
413413
try {
414414
const result = await poll(
415415
() =>
416-
transitGateway.detailTransitGatewayConnection({
416+
transitGateway.getTransitGatewayConnection({
417417
transitGatewayId: GATEWAY_INSTANCE_ID,
418418
id: CONN_INSTANCE_ID,
419419
}),
@@ -462,7 +462,7 @@ describe('TransitGatewayApisV1', () => {
462462
try {
463463
const result = await poll(
464464
() =>
465-
transitGateway.detailTransitGateway({
465+
transitGateway.getTransitGateway({
466466
id: GATEWAY_INSTANCE_ID,
467467
}),
468468
result => result.status === 404,
@@ -511,7 +511,7 @@ describe('TransitGatewayApisV1', () => {
511511
describe('Get Location', () => {
512512
test('successfully get location by ID', async done => {
513513
try {
514-
const response = await transitGateway.detailGatewayLocation({
514+
const response = await transitGateway.getGatewayLocation({
515515
name: config.LOCATION_NAME,
516516
});
517517

@@ -527,7 +527,7 @@ describe('TransitGatewayApisV1', () => {
527527

528528
test('fail to get location by instance id', async done => {
529529
try {
530-
await transitGateway.detailGatewayLocation({
530+
await transitGateway.getGatewayLocation({
531531
name: '111',
532532
});
533533
} catch (err) {

0 commit comments

Comments
 (0)