@opentap/runner-client 2.16.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/RunnerClient.d.ts +2 -1
- package/lib/RunnerClient.js +15 -0
- package/lib/requestDTOs.d.ts +5 -1
- package/package.json +1 -1
package/lib/RunnerClient.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { RunnerUpdateRequest } from './requestDTOs';
|
|
1
2
|
import { Image, RepositoryPackageReference, Session } from './DTOs';
|
|
2
3
|
import { BaseClient } from './BaseClient';
|
|
3
4
|
import { ConnectionOptions } from 'nats.ws';
|
|
4
|
-
import { RunnerUpdateRequest } from './requestDTOs';
|
|
5
5
|
export declare class RunnerClient extends BaseClient {
|
|
6
6
|
default: {
|
|
7
7
|
startSession: (testPlanRepositoryReference?: RepositoryPackageReference, timeout?: number) => Promise<Session>;
|
|
8
|
+
startSessionWithOverriddenImage: (testPlanReference?: RepositoryPackageReference, imageOverride?: Image, timeout?: number) => Promise<Session>;
|
|
8
9
|
getImage: () => Promise<Image>;
|
|
9
10
|
setImage: (image: Image) => Promise<Image>;
|
|
10
11
|
getSettings: () => Promise<RepositoryPackageReference | undefined>;
|
package/lib/RunnerClient.js
CHANGED
|
@@ -30,6 +30,21 @@ var RunnerClient = /** @class */ (function (_super) {
|
|
|
30
30
|
.then(_this.success())
|
|
31
31
|
.catch(_this.error());
|
|
32
32
|
},
|
|
33
|
+
/* Create a Session based on the dependencies of a TestPlan, but with
|
|
34
|
+
an image which packages overrides the default and testplan dependencies.
|
|
35
|
+
Returned Session will have referenced TestPlan pre-loaded. The Session
|
|
36
|
+
will be created with the base image and base settings.
|
|
37
|
+
*/
|
|
38
|
+
startSessionWithOverriddenImage: function (testPlanReference, imageOverride, timeout) {
|
|
39
|
+
var defaultSessionRequest = {
|
|
40
|
+
testPlanReference: testPlanReference !== null && testPlanReference !== void 0 ? testPlanReference : null,
|
|
41
|
+
imageOverride: imageOverride !== null && imageOverride !== void 0 ? imageOverride : null,
|
|
42
|
+
};
|
|
43
|
+
return _this.request('StartDefaultSessionOverrideImage', defaultSessionRequest, { timeout: timeout })
|
|
44
|
+
.then(function (sessionJs) { return Session.fromJS(sessionJs); })
|
|
45
|
+
.then(_this.success())
|
|
46
|
+
.catch(_this.error());
|
|
47
|
+
},
|
|
33
48
|
/* Gets the base image. The base image is always included in the image
|
|
34
49
|
creation process */
|
|
35
50
|
getImage: function () {
|
package/lib/requestDTOs.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { CommonContext, ComponentSettingsBase, ComponentSettingsListItem, DataGridControl, Setting } from './DTOs';
|
|
1
|
+
import { CommonContext, ComponentSettingsBase, ComponentSettingsListItem, DataGridControl, Image, RepositoryPackageReference, Setting } from './DTOs';
|
|
2
|
+
export interface DefaultSessionRequest {
|
|
3
|
+
imageOverride: Image | null;
|
|
4
|
+
testPlanReference: RepositoryPackageReference | null;
|
|
5
|
+
}
|
|
2
6
|
export interface SetSettingsRequest {
|
|
3
7
|
contextId: string;
|
|
4
8
|
settings: Setting[];
|