Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dc4cd9a
Configure Mend for GitHub Enterprise (#28)
Nov 21, 2023
a8cd650
ci: :wrench: enable mend renovate (#29)
michael-magrian Jan 15, 2024
f95d70d
fix(tests): fixed broken integration tests (#33)
reggeenr Jan 16, 2024
0144b02
chore(deps): update dependency typescript to v4.9.5 (#31)
Jan 16, 2024
13866cc
chore(deps): update dependency prettier to v2.8.8 (#30)
Jan 16, 2024
2537279
chore(deps): update dependency eslint-config-prettier to v8.10.0 (#35)
Jan 16, 2024
babde72
fix(deps): update dependency @kubernetes/client-node to ^0.20.0 (#39)
Jan 16, 2024
f128b05
chore(deps): update dependency eslint-plugin-import to v2.29.1 (#36)
Jan 16, 2024
93ed48d
chore(deps): update dependency jest to v29.7.0 (#37)
Jan 16, 2024
62d20e5
chore(deps): update dependency axios to v1 (#41)
Jan 16, 2024
1afb3fc
fix(deps): update dependency ibm-cloud-sdk-core to v4.2.2 (#40)
Jan 16, 2024
c0c96d5
chore(deps): update dependency nock to v13.5.0 (#38)
Jan 16, 2024
8439141
chore(deps): update dependency dotenv to v16 (#43)
Jan 17, 2024
ceb1838
ci(mend): :wrench: update renovate config (#42)
michael-magrian Jan 17, 2024
78cbcfd
chore(deps): update dependency installed-check to v8 (#52)
Jan 17, 2024
1934f6e
chore(deps): update dependency eslint-plugin-node to v11 (#50)
Jan 17, 2024
b6ad379
chore(deps): update typescript-eslint monorepo to v6 (#55)
Jan 18, 2024
ca794e0
fix(deps): update dependency @types/node to v20 (#56)
Jan 18, 2024
8f51f89
chore(deps): update dependency dotenv to v16.4.0 (#57)
Jan 24, 2024
7e2b74b
chore(deps): update typescript-eslint monorepo to v6.19.1 (#58)
Jan 24, 2024
0288db5
fix(deps): update dependency @types/node to v20.11.6 (#59)
Jan 24, 2024
180d893
chore(deps): update dependency dotenv to v16.4.1 (#63)
Jan 25, 2024
10a962c
chore(deps): update dependency axios to v1.6.6 (#62)
Jan 25, 2024
ffc3dc1
feat(api): SDK update 20240124-163103 (#61)
Jan 25, 2024
d623a08
fix(ci): travis dependencies (#64)
Jan 25, 2024
48592a5
node version 20 is necessary for latest semantic-release (#66)
Jan 26, 2024
e1d393c
Update version 4.0.0 -> 4.1.0 [skip ci]
semantic-release-bot Jan 26, 2024
f66f5a9
chore(release): 4.1.0 release notes [skip ci]
semantic-release-bot Jan 26, 2024
70ee21e
chore(deps): update dependency axios to v1.6.7 (#65)
Jan 26, 2024
c90745f
fix(deps): update dependency @types/node to v20.11.8 (#67)
Jan 28, 2024
e861527
chore(deps): update dependency nock to v13.5.1 (#68)
Jan 28, 2024
2efaa2a
fix(deps): update dependency @types/node to v20.11.10 (#69)
Jan 28, 2024
04e6515
SDK update 20240129-114135
Jan 29, 2024
85c0a87
Merge branch 'main' into sdk-update-20240129-114135
Jan 29, 2024
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
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,12 @@ secrets.tar

# ignore the generated integration test files, as they cannot be used without manual editing
test/integration/code-engine.v1.test.js
test/integration/code-engine.v2.test.js
test/integration/code-engine.v2.test.js


# ignore the generated SSH and TLS keys and certs
test/integration/domain*
test/integration/sshkey*

# API repo (pulled from Github)
api
774 changes: 708 additions & 66 deletions code-engine/v2.ts

Large diffs are not rendered by default.

160 changes: 159 additions & 1 deletion examples/code-engine.v2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @jest-environment node
*/
/**
* (C) Copyright IBM Corp. 2023.
* (C) Copyright IBM Corp. 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -1179,6 +1179,138 @@ describe('CodeEngineV2', () => {
// end-replace_secret
});

test('listDomainMappings request example', async () => {
consoleLogMock.mockImplementation((output) => {
originalLog(output);
});
consoleWarnMock.mockImplementation((output) => {
// if an error occurs, display the message and then fail the test
originalWarn(output);
expect(true).toBeFalsy();
});

originalLog('listDomainMappings() result:');
// begin-list_domain_mappings

const params = {
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
limit: 100,
};

const allResults = [];
try {
const pager = new CodeEngineV2.DomainMappingsPager(codeEngineService, params);
while (pager.hasNext()) {
const nextPage = await pager.getNext();
expect(nextPage).not.toBeNull();
allResults.push(...nextPage);
}
console.log(JSON.stringify(allResults, null, 2));
} catch (err) {
console.warn(err);
}

// end-list_domain_mappings
});

test('createDomainMapping request example', async () => {
consoleLogMock.mockImplementation((output) => {
originalLog(output);
});
consoleWarnMock.mockImplementation((output) => {
// if an error occurs, display the message and then fail the test
originalWarn(output);
expect(true).toBeFalsy();
});

originalLog('createDomainMapping() result:');
// begin-create_domain_mapping

// Request models needed by this operation.

// ComponentRef
const componentRefModel = {
name: 'my-app-1',
resource_type: 'app_v2',
};

const params = {
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
component: componentRefModel,
name: 'www.example.com',
tlsSecret: 'my-tls-secret',
};

let res;
try {
res = await codeEngineService.createDomainMapping(params);
console.log(JSON.stringify(res.result, null, 2));
} catch (err) {
console.warn(err);
}

// end-create_domain_mapping
});

test('getDomainMapping request example', async () => {
consoleLogMock.mockImplementation((output) => {
originalLog(output);
});
consoleWarnMock.mockImplementation((output) => {
// if an error occurs, display the message and then fail the test
originalWarn(output);
expect(true).toBeFalsy();
});

originalLog('getDomainMapping() result:');
// begin-get_domain_mapping

const params = {
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
name: 'www.example.com',
};

let res;
try {
res = await codeEngineService.getDomainMapping(params);
console.log(JSON.stringify(res.result, null, 2));
} catch (err) {
console.warn(err);
}

// end-get_domain_mapping
});

test('updateDomainMapping request example', async () => {
consoleLogMock.mockImplementation((output) => {
originalLog(output);
});
consoleWarnMock.mockImplementation((output) => {
// if an error occurs, display the message and then fail the test
originalWarn(output);
expect(true).toBeFalsy();
});

originalLog('updateDomainMapping() result:');
// begin-update_domain_mapping

const params = {
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
name: 'www.example.com',
ifMatch: 'testString',
};

let res;
try {
res = await codeEngineService.updateDomainMapping(params);
console.log(JSON.stringify(res.result, null, 2));
} catch (err) {
console.warn(err);
}

// end-update_domain_mapping
});

test('deleteProject request example', async () => {
consoleLogMock.mockImplementation((output) => {
originalLog(output);
Expand Down Expand Up @@ -1438,4 +1570,30 @@ describe('CodeEngineV2', () => {

// end-delete_secret
});

test('deleteDomainMapping request example', async () => {
consoleLogMock.mockImplementation((output) => {
originalLog(output);
});
consoleWarnMock.mockImplementation((output) => {
// if an error occurs, display the message and then fail the test
originalWarn(output);
expect(true).toBeFalsy();
});

// begin-delete_domain_mapping

const params = {
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
name: 'www.example.com',
};

try {
await codeEngineService.deleteDomainMapping(params);
} catch (err) {
console.warn(err);
}

// end-delete_domain_mapping
});
});
Loading