Skip to content

Commit

Permalink
devonfw#759: Test beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
KianRolf committed Nov 29, 2024
1 parent fa91325 commit c980055
Show file tree
Hide file tree
Showing 40 changed files with 178 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ private void updateDevonProperties() {
}
}
Files.move(file_path, target);
this.context.success("Updated file name: " + file_path + "\n-> " + target + "and updated variables");
this.context.success("Updated file name: " + file_path + "\n-> " + target + " and updated variables");
} catch (IOException e) {
this.context.error("Error updating file name: " + file_path, e);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.devonfw.tools.ide.commandlet;

import org.junit.Test;

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

public class UpgradeSettingsCommandletTest extends AbstractIdeContextTest {

private static final String PROJECT_INTELLIJ = "upgrade-settings";
private final IdeTestContext context = newContext(PROJECT_INTELLIJ);

@Test
public void testDevonPropertiesUpgrade() {
//arrange
UpgradeSettingsCommandlet upgradeSettingsCommandlet = new UpgradeSettingsCommandlet(context);
//act
upgradeSettingsCommandlet.run();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
echo "ide $*"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
testVersion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the tool repository
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c2de7dfbd9f8faaa21b4cdd8518f826dd558c9ab24a0616b3ed28437a674a97b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://localhost:1111/installTest/linux
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c2de7dfbd9f8faaa21b4cdd8518f826dd558c9ab24a0616b3ed28437a674a97b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://localhost:1111/installTest/macOS
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"manual": true,
"urls": {
"-680270697": {
"success": {
"timestamp": "2023-04-28T16:27:32.819394600Z"
}
},
"-896197542": {
"success": {
"timestamp": "2023-04-28T16:27:47.658175400Z"
}
},
"-310367019": {
"success": {
"timestamp": "2023-04-28T16:28:02.221367500Z"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://localhost:1111/installTest/windows
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aa64bee5f7ba56fbbd60d766f3a652600f81571ae5e996804694c69bf731af8b
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"manual": false,
"urls": {
"-997329125": {
"success": {
"timestamp": "2023-04-28T07:12:26.601818Z"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"manual": false,
"urls": {
"-997329125": {
"success": {
"timestamp": "2023-04-28T07:12:26.601818Z"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

"manual" : false,
"urls" : {
"-997329125" : {
"success" : {
"timestamp" : "2023-04-28T07:12:26.601818Z"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

"manual" : false,
"urls" : {
"-997329125" : {
"success" : {
"timestamp" : "2023-04-28T07:12:26.601818Z"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the download metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#********************************************************************************
# This file contains project specific environment variables defined by the user
#********************************************************************************
M2_REPO=~/.m2/repository
MVN_VERSION=3.9.1
SOME=some-${UNDEFINED}
TEST_ARGS1=${TEST_ARGS1} conf1
TEST_ARGS2=${TEST_ARGS2} conf2
TEST_ARGS5=${TEST_ARGS5} conf5
TEST_ARGS6=${TEST_ARGS6} conf6
TEST_ARGS7=${TEST_ARGS7} conf7
TEST_ARGS8=${TEST_ARGS8} conf8
TEST_ARGSa=${TEST_ARGS1} ${TEST_ARGS3} confa
TEST_ARGSc=${TEST_ARGSc} confc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#********************************************************************************
# This file contains the global configuration from the user HOME directory.
#********************************************************************************
DOCKER_EDITION=docker
FOO=foo-${BAR}
TEST_ARGS1=${TEST_ARGS1} user1
TEST_ARGS2=${TEST_ARGS2} user2
TEST_ARGS3=${TEST_ARGS3} user3
TEST_ARGS7=user7
TEST_ARGS10=user10
TEST_ARGSb=userb
TEST_ARGSc=${TEST_ARGS1} userc
TEST_ARGSd=${TEST_ARGS1} userd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugin_url=https://raw.githubusercontent.com/iloveeclipse/plugins/latest/
plugin_id=AnyEditTools.feature.group
plugin_active=false
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the download cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# if this file is present, it will replace and mock System.getenv in the text context
PATH=${IDE_ROOT}/_ide/bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the users HOME directory
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the IDE_HOME directory
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
the IDE CLI bash script
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugin_url=https://raw.githubusercontent.com/iloveeclipse/plugins/latest/
plugin_id=AnyEditTools.feature.group
plugin_active=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugin_url=https://checkstyle.org/eclipse-cs-update-site
plugin_id=net.sf.eclipsecs.feature.group
plugin_active=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#********************************************************************************
# This file contains project specific environment variables
#********************************************************************************
JAVA_VERSION=17*
MVN_VERSION=3.9.0
ECLIPSE_VERSION=2023-03
INTELLIJ_EDITION=ultimate
IDE_TOOLS=mvn,eclipse
BAR=bar-${SOME}
TEST_ARGS1=${TEST_ARGS1} settings1
TEST_ARGS4=${TEST_ARGS4} settings4
TEST_ARGS5=${TEST_ARGS5} settings5
TEST_ARGS6=${TEST_ARGS6} settings6
TEST_ARGS7=${TEST_ARGS7} settings7
TEST_ARGS8=settings8
TEST_ARGS9=settings9
TEST_ARGSb=${TEST_ARGS10} settingsb ${TEST_ARGSa} ${TEST_ARGSb}
TEST_ARGSc=${TEST_ARGSc} settingsc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
just a marker for detection of IDE_HOME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the main workspace of basic
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
if [ "$1" == "-h" ]; then
echo "usage: mvn [options] [<goal(s)>] [<phase(s)>]"
fi
echo "mvn $*"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the java bin folder
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is npm software of basic
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#********************************************************************************
# Type of {@link EnvironmentVariables} from the
# {@link com.devonfw.tools.ide.context.IdeContext#getWorkspacePath() workspace directory}.
#********************************************************************************
TEST_ARGS1=${TEST_ARGS1} workspace1
TEST_ARGS3=${TEST_ARGS3} workspace3
TEST_ARGS6=${TEST_ARGS6} workspace6
TEST_ARGS7=${TEST_ARGS7} workspace7
TEST_ARGS8=${TEST_ARGS8} workspace8
TEST_ARGS9=${TEST_ARGS9} workspace9
TEST_ARGS10=${TEST_ARGS10} workspace10
TEST_ARGSd=${TEST_ARGSd} workspaced
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
my-git-repo in foo-test workspace of basic
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the foo-test workspace of basic
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the main workspace of basic
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is the IDE_ROOT directory

0 comments on commit c980055

Please sign in to comment.