Skip to content

Commit e704971

Browse files
removed odo log command
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
1 parent 135315f commit e704971

File tree

2 files changed

+0
-56
lines changed

2 files changed

+0
-56
lines changed

src/odo/command.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,6 @@ export class Command {
4646
return Command.describeComponent().addOption(new CommandOption('-o', 'json', false));
4747
}
4848

49-
static showLog(platform?: string): CommandText {
50-
const result = new CommandText('odo', 'logs', [
51-
new CommandOption('--dev'),
52-
]);
53-
if (platform) {
54-
result.addOption(new CommandOption('--platform', platform));
55-
}
56-
return result;
57-
}
58-
59-
static showLogAndFollow(platform?: string): CommandText {
60-
return Command.showLog(platform).addOption(new CommandOption('--follow'));
61-
}
62-
6349
@verbose
6450
static createLocalComponent(
6551
devfileType = '', // will use empty string in case of undefined devfileType passed in

test/integration/command.test.ts

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -165,48 +165,6 @@ suite('odo commands integration', function () {
165165
term.dispose();
166166
});
167167

168-
test('showLog()', async function () {
169-
await ODO.execute(Command.showLog(), componentLocation);
170-
});
171-
172-
test('showLogAndFollow()', async function() {
173-
const outputEmitter = new EventEmitter<string>();
174-
let devProcess: ChildProcess;
175-
function failListener(_error) {
176-
assert.fail('showLogAndFollow() errored before it was closed');
177-
}
178-
const term = window.createTerminal({
179-
name: 'test terminal',
180-
pty: {
181-
open: () => {
182-
void CliChannel.getInstance().spawnTool(Command.showLogAndFollow()) //
183-
.then(childProcess => {
184-
devProcess = childProcess
185-
devProcess.on('error', failListener);
186-
});
187-
},
188-
close: () => {
189-
if (devProcess) {
190-
devProcess.removeListener('error', failListener);
191-
devProcess.kill('SIGINT');
192-
}
193-
},
194-
handleInput: (data: string) => {
195-
if (data.length) {
196-
if (devProcess) {
197-
devProcess.removeListener('error', failListener);
198-
devProcess.kill('SIGINT');
199-
}
200-
}
201-
},
202-
onDidWrite: outputEmitter.event
203-
}
204-
});
205-
await new Promise<void>(resolve => setTimeout(resolve, 1000));
206-
// we instruct the pseudo terminal to close the dev session when any text is sent
207-
term.sendText('a');
208-
term.dispose();
209-
});
210168
});
211169

212170
suite('component dev', function() {

0 commit comments

Comments
 (0)