Skip to content

Commit

Permalink
add more tests for run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhoss committed Sep 10, 2020
1 parent d5e4feb commit 3005461
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/test/java/wtf/metio/ilo/cli/RunCommandsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import wtf.metio.ilo.test.TestResources;

import java.nio.file.Paths;
import java.util.stream.Stream;

import static org.junit.jupiter.api.Assertions.*;
Expand Down Expand Up @@ -96,4 +94,17 @@ void noRunCommandsForGenerateCompletion() {
assertFalse(RunCommands.shouldAddRunCommands(new String[]{"generate-completion"}));
}

@Test
@DisplayName("allow to call ilo with run commands")
void runCommandsForMainCommand() {
assertTrue(RunCommands.shouldAddRunCommands(new String[]{}));
}
@Test
@DisplayName("allow to call 'ilo <command>' with run commands")
void runCommandsForSubCommand() {
assertTrue(RunCommands.shouldAddRunCommands(new String[]{"shell"}));
assertTrue(RunCommands.shouldAddRunCommands(new String[]{"compose"}));
assertTrue(RunCommands.shouldAddRunCommands(new String[]{"devcontainer"}));
}

}

0 comments on commit 3005461

Please sign in to comment.