Skip to content

Commit

Permalink
#827: Made status commandlet available outside of IDE_HOME (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
WorkingAmeise authored Dec 12, 2024
1 parent 47f7b23 commit 4c47f1f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,10 @@ private void logOnlineStatus() {
this.context.warning("You are offline. Check your internet connection and potential proxy settings.");
}
}

@Override
public boolean isIdeRootRequired() {

return false;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.devonfw.tools.ide.commandlet;

import org.junit.jupiter.api.Test;

import com.devonfw.tools.ide.cli.CliArguments;
import com.devonfw.tools.ide.context.AbstractIdeContextTest;
import com.devonfw.tools.ide.context.IdeTestContext;

/**
* Test of {@link StatusCommandlet}.
*/
public class StatusCommandletTest extends AbstractIdeContextTest {

private static final String PROJECT_BASIC = "basic";

@Test
public void testStatusOutsideOfHome() {
//arrange
IdeTestContext context = new IdeTestContext();
CliArguments args = new CliArguments("status");
args.next();

//act
context.run(args);

//assert
assertThat(context).logAtWarning().hasMessageContaining("You are not inside an IDE installation: ");
}
}

0 comments on commit 4c47f1f

Please sign in to comment.