Skip to content

Commit 0295840

Browse files
authored
Merge pull request #12 from IBM/sdk-update-20230327-121100
Sdk update 20230327 121100
2 parents ee5c00d + 71f179c commit 0295840

File tree

8 files changed

+1486
-16266
lines changed

8 files changed

+1486
-16266
lines changed

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ tslint.json
88
.eslintignore
99
.github
1010
*.ts
11-
!*.d.ts
11+
!*.d.ts

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@ Node.js client library to interact with the [Code Engine API](https://cloud.ibm.
2222

2323
<!-- toc -->
2424

25-
- [Overview](#overview)
26-
- [Prerequisites](#prerequisites)
27-
- [Installation](#installation)
28-
- [Using the SDK](#using-the-sdk)
29-
- [Questions](#questions)
30-
- [Issues](#issues)
31-
- [Open source @ IBM](#open-source--ibm)
32-
- [Contributing](#contributing)
33-
- [License](#license)
25+
- [NodeJS SDK for IBM Cloud Code Engine](#nodejs-sdk-for-ibm-cloud-code-engine)
26+
- [Table of Contents](#table-of-contents)
27+
- [Overview](#overview)
28+
- [Prerequisites](#prerequisites)
29+
- [Installation](#installation)
30+
- [Using the SDK](#using-the-sdk)
31+
- [Questions](#questions)
32+
- [Issues](#issues)
33+
- [Open source @ IBM](#open-source--ibm)
34+
- [Contributing](#contributing)
35+
- [License](#license)
3436

3537
<!-- tocstop -->
3638

@@ -41,7 +43,6 @@ The IBM Cloud Code Engine Node.js SDK allows developers to programmatically inte
4143

4244
Service Name | Import Path
4345
--- | ---
44-
[Code Engine](https://cloud.ibm.com/apidocs/codeengine) |
4546
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v2.0.0) | @ibm-cloud/ibm-code-engine-sdk/code-engine/v2
4647
[Code Engine](https://cloud.ibm.com/apidocs/codeengine/codeengine-v1.0.0) | ibm-code-engine-sdk/ibm-cloud-code-engine/v1
4748

@@ -58,7 +59,7 @@ npm install @ibm-cloud/ibm-code-engine-sdk
5859
```
5960

6061
## Using the SDK
61-
Examples and a demo are available in the [example](/example) folder.
62+
Examples and a demo are available in the [examples](/examples) folder.
6263

6364
For general SDK usage information, please see
6465
[this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/master/README.md)

code-engine/v2.ts

Lines changed: 231 additions & 113 deletions
Large diffs are not rendered by default.

examples/code-engine.v2.test.js

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,34 @@ describe('CodeEngineV2', () => {
155155
// end-get_project
156156
});
157157

158+
test('getProjectEgressIps request example', async () => {
159+
consoleLogMock.mockImplementation((output) => {
160+
originalLog(output);
161+
});
162+
consoleWarnMock.mockImplementation((output) => {
163+
// if an error occurs, display the message and then fail the test
164+
originalWarn(output);
165+
expect(true).toBeFalsy();
166+
});
167+
168+
originalLog('getProjectEgressIps() result:');
169+
// begin-get_project_egress_ips
170+
171+
const params = {
172+
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
173+
};
174+
175+
let res;
176+
try {
177+
res = await codeEngineService.getProjectEgressIps(params);
178+
console.log(JSON.stringify(res.result, null, 2));
179+
} catch (err) {
180+
console.warn(err);
181+
}
182+
183+
// end-get_project_egress_ips
184+
});
185+
158186
test('listApps request example', async () => {
159187
consoleLogMock.mockImplementation((output) => {
160188
originalLog(output);
@@ -329,7 +357,7 @@ describe('CodeEngineV2', () => {
329357
const params = {
330358
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
331359
appName: 'my-app',
332-
name: 'my-app-001',
360+
name: 'my-app-00001',
333361
};
334362

335363
let res;
@@ -544,7 +572,7 @@ describe('CodeEngineV2', () => {
544572

545573
const params = {
546574
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
547-
name: 'my-job',
575+
name: 'my-job-run',
548576
};
549577

550578
let res;
@@ -825,7 +853,7 @@ describe('CodeEngineV2', () => {
825853

826854
const params = {
827855
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
828-
name: 'my-configmap',
856+
name: 'my-config-map',
829857
};
830858

831859
let res;
@@ -1087,7 +1115,7 @@ describe('CodeEngineV2', () => {
10871115
const params = {
10881116
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
10891117
appName: 'my-app',
1090-
name: 'my-app-001',
1118+
name: 'my-app-00001',
10911119
};
10921120

10931121
try {
@@ -1139,7 +1167,7 @@ describe('CodeEngineV2', () => {
11391167

11401168
const params = {
11411169
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
1142-
name: 'my-job',
1170+
name: 'my-job-run',
11431171
};
11441172

11451173
try {

0 commit comments

Comments
 (0)