Skip to content

Commit

Permalink
Change deleteInstalledChannel to deleteDevChannel, other small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MilapNaik committed Feb 29, 2024
1 parent f5ba839 commit 2858dd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/RokuDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export class RokuDeploy {
* Deletes any installed dev channel on the target Roku device
* @param options
*/
public async deleteDevChannel(options?: DeleteInstalledChannelOptions) {
public async deleteDevChannel(options?: DeleteDevChannelOptions) {
options = this.getOptions(options) as any;

let deleteOptions = this.generateBaseRequestOptions('plugin_install', options as any);
Expand Down Expand Up @@ -647,7 +647,7 @@ export class RokuDeploy {
retainDeploymentArchive: true,
incrementBuildNumber: false,
failOnCompileError: true,
deleteInstalledChannel: true,
deleteDevChannel: true,
packagePort: 80,
remotePort: 8060,
timeout: 150000,
Expand Down Expand Up @@ -1013,7 +1013,7 @@ export interface CreateSignedPackageOptions {
devId?: string;
}

export interface DeleteInstalledChannelOptions {
export interface DeleteDevChannelOptions {
host: string;
password: string;
}
Expand All @@ -1029,7 +1029,7 @@ export interface DeployOptions {
files?: FileEntry[];
rootDir?: string;
stagingDir?: string;
deleteInstalledChannel?: boolean;
deleteDevChannel?: boolean;
outFile?: string;
outDir?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion src/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('cli', () => {
});

it('Publish passes proper options', async () => {
const stub = sinon.stub(rokuDeploy, 'publish').callsFake(async () => {
const stub = sinon.stub(rokuDeploy, 'sideload').callsFake(async () => {
return Promise.resolve({
message: 'Publish successful',
results: {}
Expand Down
12 changes: 1 addition & 11 deletions src/device.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as assert from 'assert';
import * as fsExtra from 'fs-extra';
import type { RokuDeployOptions } from './index';
import { rokuDeploy } from './index';
import { cwd, expectPathExists, expectThrowsAsync, outDir, rootDir, tempDir, writeFiles } from './testUtils.spec';
import { cwd, expectThrowsAsync, outDir, rootDir, tempDir, writeFiles } from './testUtils.spec';
import * as dedent from 'dedent';

//these tests are run against an actual roku device. These cannot be enabled when run on the CI server
Expand Down Expand Up @@ -79,14 +79,4 @@ describe('device', function device() {
);
});
});

describe('deployAndSignPackage', () => {
it('works', async () => {
await rokuDeploy.deleteInstalledChannel(options as any);
await rokuDeploy.rekeyDevice(options as any);
expectPathExists(
await rokuDeploy.deployAndSignPackage(options as any)
);
});
});
});

0 comments on commit 2858dd6

Please sign in to comment.