Skip to content

Conversation

@wustudent
Copy link
Contributor

@wustudent wustudent commented Oct 17, 2025

This PR fixes #1521.

Implemented changes:

  • Correct WireMock usage in UpdateCommandletTest

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Oct 17, 2025
@wustudent wustudent self-assigned this Oct 17, 2025
@wustudent wustudent moved this from 🆕 New to 🏗 In progress in IDEasy board Oct 17, 2025
@wustudent wustudent moved this from 🏗 In progress to Team Review in IDEasy board Oct 17, 2025
@wustudent wustudent added test related to testing and QA internal Nothing to be added to CHANGELOG, only internal story labels Oct 17, 2025
@coveralls
Copy link
Collaborator

coveralls commented Oct 17, 2025

Pull Request Test Coverage Report for Build 18680241255

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 12 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.1%) to 68.407%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/context/AbstractIdeContext.java 1 63.73%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 1 78.33%
com/devonfw/tools/ide/tool/repository/NpmRepository.java 1 72.41%
com/devonfw/tools/ide/process/ProcessContextImpl.java 2 81.06%
com/devonfw/tools/ide/cli/CliProcessException.java 3 0.0%
com/devonfw/tools/ide/version/VersionLetters.java 4 61.16%
Totals Coverage Status
Change from base Build 18646811176: -0.1%
Covered Lines: 9045
Relevant Lines: 12735

💛 - Coveralls

@jan-vcapgemini jan-vcapgemini marked this pull request as ready for review October 21, 2025 10:03
@jan-vcapgemini jan-vcapgemini self-assigned this Oct 21, 2025
@jan-vcapgemini jan-vcapgemini self-requested a review October 21, 2025 10:03
@jan-vcapgemini jan-vcapgemini added the update related to updating software or the entire ide label Oct 21, 2025
@jan-vcapgemini jan-vcapgemini added this to the internal milestone Oct 21, 2025
@jan-vcapgemini
Copy link
Contributor

It looks like some files are missing for this test as the pipeline now throws this exception:

2025-10-21T10:05:46.5576469Z 10:05:46.527 [main] - ERROR - c.d.tools.ide.log.IdeSubLoggerSlf4j - java.lang.RuntimeException: java.nio.file.NoSuchFileException: /home/runner/work/IDEasy/IDEasy/cli/target/test-projects/update/repository/npmjs
2025-10-21T10:05:46.5578790Z java.lang.RuntimeException: java.nio.file.NoSuchFileException: /home/runner/work/IDEasy/IDEasy/cli/target/test-projects/update/repository/npmjs
2025-10-21T10:05:46.5580364Z 	at com.devonfw.tools.ide.context.NpmRepositoryMock.mockNpmPackageResponses(NpmRepositoryMock.java:76)
2025-10-21T10:05:46.5581567Z 	at com.devonfw.tools.ide.context.NpmRepositoryMock.<init>(NpmRepositoryMock.java:34)
2025-10-21T10:05:46.5582676Z 	at com.devonfw.tools.ide.context.IdeTestContext.createNpmRepository(IdeTestContext.java:118)
2025-10-21T10:05:46.5583919Z 	at com.devonfw.tools.ide.context.AbstractIdeContext.getNpmRepository(AbstractIdeContext.java:427)
2025-10-21T10:05:46.5585177Z 	at com.devonfw.tools.ide.tool.npm.NpmBasedCommandlet.getToolRepository(NpmBasedCommandlet.java:38)
2025-10-21T10:05:46.5586372Z 	at com.devonfw.tools.ide.tool.LocalToolCommandlet.installTool(LocalToolCommandlet.java:204)
2025-10-21T10:05:46.5587476Z 	at com.devonfw.tools.ide.tool.LocalToolCommandlet.installTool(LocalToolCommandlet.java:187)
2025-10-21T10:05:46.5588819Z 	at com.devonfw.tools.ide.tool.LocalToolCommandlet.doInstallStep(LocalToolCommandlet.java:100)
2025-10-21T10:05:46.5589905Z 	at com.devonfw.tools.ide.tool.LocalToolCommandlet.install(LocalToolCommandlet.java:90)
2025-10-21T10:05:46.5590867Z 	at com.devonfw.tools.ide.tool.ToolCommandlet.install(ToolCommandlet.java:266)
2025-10-21T10:05:46.5592131Z 	at com.devonfw.tools.ide.commandlet.AbstractUpdateCommandlet.lambda$doUpdateSoftwareStep$4(AbstractUpdateCommandlet.java:299)
2025-10-21T10:05:46.5593245Z 	at com.devonfw.tools.ide.step.Step.run(Step.java:230)
2025-10-21T10:05:46.5593879Z 	at com.devonfw.tools.ide.step.Step.run(Step.java:219)
2025-10-21T10:05:46.5594976Z 	at com.devonfw.tools.ide.commandlet.AbstractUpdateCommandlet.doUpdateSoftwareStep(AbstractUpdateCommandlet.java:299)
2025-10-21T10:05:46.5596850Z 	at com.devonfw.tools.ide.commandlet.AbstractUpdateCommandlet.lambda$updateSoftware$2(AbstractUpdateCommandlet.java:267)
2025-10-21T10:05:46.5598271Z 	at com.devonfw.tools.ide.step.Step.run(Step.java:230)
2025-10-21T10:05:46.5598885Z 	at com.devonfw.tools.ide.step.Step.run(Step.java:219)
2025-10-21T10:05:46.5599936Z 	at com.devonfw.tools.ide.commandlet.AbstractUpdateCommandlet.updateSoftware(AbstractUpdateCommandlet.java:267)
2025-10-21T10:05:46.5601584Z 	at com.devonfw.tools.ide.commandlet.AbstractUpdateCommandlet.run(AbstractUpdateCommandlet.java:93)
2025-10-21T10:05:46.5602818Z 	at com.devonfw.tools.ide.commandlet.UpdateCommandlet.run(UpdateCommandlet.java:30)
2025-10-21T10:05:46.5604516Z 	at com.devonfw.tools.ide.commandlet.UpdateCommandletTest.testRunUpdateSoftwareDoesNotFailWhenSettingPathIsDeleted(UpdateCommandletTest.java:128)
2025-10-21T10:05:46.5606333Z 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
2025-10-21T10:05:46.5607410Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
2025-10-21T10:05:46.5608622Z 	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:775)
2025-10-21T10:05:46.5609836Z 	at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:479)
2025-10-21T10:05:46.5611060Z 	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
2025-10-21T10:05:46.5612535Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
2025-10-21T10:05:46.5614006Z 	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:161)
2025-10-21T10:05:46.5615313Z 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:152)
2025-10-21T10:05:46.5616705Z 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:91)
2025-10-21T10:05:46.5618655Z 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:112)
2025-10-21T10:05:46.5620569Z 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:94)
2025-10-21T10:05:46.5622307Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
2025-10-21T10:05:46.5623964Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
2025-10-21T10:05:46.5625497Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
2025-10-21T10:05:46.5627022Z 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
2025-10-21T10:05:46.5628747Z 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:93)
2025-10-21T10:05:46.5630326Z 	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:87)
2025-10-21T10:05:46.5631909Z 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:216)
2025-10-21T10:05:46.5633400Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2025-10-21T10:05:46.5634913Z 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:212)
2025-10-21T10:05:46.5636461Z 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
2025-10-21T10:05:46.5637955Z 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
2025-10-21T10:05:46.5638773Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:156)
2025-10-21T10:05:46.5639763Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2025-10-21T10:05:46.5640527Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:146)
2025-10-21T10:05:46.5641176Z 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
2025-10-21T10:05:46.5641819Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:144)
2025-10-21T10:05:46.5642681Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2025-10-21T10:05:46.5643421Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:143)
2025-10-21T10:05:46.5644120Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:100)
2025-10-21T10:05:46.5644643Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
2025-10-21T10:05:46.5645438Z 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
2025-10-21T10:05:46.5646429Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:160)
2025-10-21T10:05:46.5647179Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2025-10-21T10:05:46.5648171Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:146)
2025-10-21T10:05:46.5648821Z 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
2025-10-21T10:05:46.5649701Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:144)
2025-10-21T10:05:46.5651210Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2025-10-21T10:05:46.5652677Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:143)
2025-10-21T10:05:46.5654015Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:100)
2025-10-21T10:05:46.5654996Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
2025-10-21T10:05:46.5656521Z 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
2025-10-21T10:05:46.5658641Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:160)
2025-10-21T10:05:46.5660045Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2025-10-21T10:05:46.5660841Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:146)
2025-10-21T10:05:46.5661504Z 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
2025-10-21T10:05:46.5662163Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:144)
2025-10-21T10:05:46.5662938Z 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
2025-10-21T10:05:46.5663684Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:143)
2025-10-21T10:05:46.5664380Z 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:100)
2025-10-21T10:05:46.5665297Z 	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
2025-10-21T10:05:46.5666302Z 	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
2025-10-21T10:05:46.5667133Z 	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
2025-10-21T10:05:46.5668372Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:201)
2025-10-21T10:05:46.5669293Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:170)
2025-10-21T10:05:46.5670073Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:94)
2025-10-21T10:05:46.5670867Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:59)
2025-10-21T10:05:46.5671880Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:142)
2025-10-21T10:05:46.5672729Z 	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:58)
2025-10-21T10:05:46.5673395Z 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:103)
2025-10-21T10:05:46.5673967Z 	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:85)
2025-10-21T10:05:46.5674698Z 	at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
2025-10-21T10:05:46.5675364Z 	at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$1(InterceptingLauncher.java:39)
2025-10-21T10:05:46.5676290Z 	at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
2025-10-21T10:05:46.5677429Z 	at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:38)
2025-10-21T10:05:46.5678832Z 	at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
2025-10-21T10:05:46.5679975Z 	at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:56)
2025-10-21T10:05:46.5681246Z 	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
2025-10-21T10:05:46.5682734Z 	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
2025-10-21T10:05:46.5684199Z 	at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
2025-10-21T10:05:46.5685488Z 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
2025-10-21T10:05:46.5686566Z 	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
2025-10-21T10:05:46.5687543Z 	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
2025-10-21T10:05:46.5688666Z 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
2025-10-21T10:05:46.5689916Z Caused by: java.nio.file.NoSuchFileException: /home/runner/work/IDEasy/IDEasy/cli/target/test-projects/update/repository/npmjs
2025-10-21T10:05:46.5691193Z 	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
2025-10-21T10:05:46.5692184Z 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
2025-10-21T10:05:46.5693153Z 	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
2025-10-21T10:05:46.5694226Z 	at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
2025-10-21T10:05:46.5695462Z 	at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171)
2025-10-21T10:05:46.5696694Z 	at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
2025-10-21T10:05:46.5697915Z 	at java.base/java.nio.file.Files.readAttributes(Files.java:1854)
2025-10-21T10:05:46.5698827Z 	at java.base/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:220)
2025-10-21T10:05:46.5699773Z 	at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:277)
2025-10-21T10:05:46.5700633Z 	at java.base/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:323)
2025-10-21T10:05:46.5701517Z 	at java.base/java.nio.file.FileTreeIterator.<init>(FileTreeIterator.java:71)
2025-10-21T10:05:46.5702567Z 	at java.base/java.nio.file.Files.walk(Files.java:3911)
2025-10-21T10:05:46.5703197Z 	at java.base/java.nio.file.Files.walk(Files.java:3966)
2025-10-21T10:05:46.5704184Z 	at com.devonfw.tools.ide.context.NpmRepositoryMock.mockNpmPackageResponses(NpmRepositoryMock.java:55)
2025-10-21T10:05:46.5705115Z 	... 94 common frames omitted
2025-10-21T10:05:46.5705836Z 10:05:46.528 [main] - ERROR - c.d.tools.ide.log.IdeSubLoggerSlf4j - Step 'Install npm' ended with failure.

Should we add the missing file or ignore this exception as it is not required for this test to be checked?

Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wustudent thanks for your fix. Apart from the exception in the pipeline, the test works as expected now. Ready for review.

@github-project-automation github-project-automation bot moved this from Team Review to 👀 In review in IDEasy board Oct 21, 2025

@Test
public void testRunUpdateSoftwareDoesNotFailWhenSettingPathIsDeleted() {
public void testRunUpdateSoftwareDoesNotFailWhenSettingPathIsDeleted(WireMockRuntimeInfo wireMockRuntimeInfo) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add Javadoc with params and why this test is needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't the method signature already tell enough?
You can also remove the plublic keyword and Intellij linter will stop complaining about missing JavaDoc.
Just my 2 cents for KISS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Nothing to be added to CHANGELOG, only internal story test related to testing and QA update related to updating software or the entire ide

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Check UpdateCommandletTest

4 participants