Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CloudShell tools tests are failing to run #520

Closed
surajssd opened this issue Feb 10, 2025 · 0 comments · Fixed by #521
Closed

[BUG] CloudShell tools tests are failing to run #520

surajssd opened this issue Feb 10, 2025 · 0 comments · Fixed by #521
Labels
bug Something isn't working Triage-needed Triage needed by Cloud Shell team

Comments

@surajssd
Copy link
Member

With error: The term 'Install-Module' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

To Reproduce

Run the following command to reproduce this issue:

docker run \
   --volume $(pwd)/tests:/tests \
   -it ghcr.io/surajssd/cloudshell/tools:master-a9a24d4-20250210-122546 \
   /tests/test.sh

Above image was built on Feb 10th.

Observed Behavior

$ docker run \
   --volume $(pwd)/tests:/tests \
   -it ghcr.io/surajssd/cloudshell/tools:master-a9a24d4-20250210-122546 /tests/test.sh
Creating user
running root-level tests

Starting discovery in 1 files.
Discovery found 1 tests in 154ms.
Running tests.
[+] /tests/Root.Tests.ps1 59.3s (58.95s|221ms)
Tests completed in 59.31s
Tests Passed: 1, Failed: 0, Skipped: 0, Inconclusive: 0, NotRun: 0
running tests as csuser
Install-Module: /tests/test.ps1:8
Line |
   8 |  Install-Module -Name Pester -Force
     |  ~~~~~~~~~~~~~~
     | The term 'Install-Module' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if
     | a path was included, verify that the path is correct and try again.

Expected behavior

The tests should pass.

Is this specific to Cloud Shell?

Something seems to be wrong with the Powershell installation.

Interface information

Using the poweshell image locally.

Additional context

Here is a GH action run that failed: https://github.com/Azure/CloudShell/actions/runs/13231016533/job/36928157459

Image
@surajssd surajssd added bug Something isn't working Triage-needed Triage needed by Cloud Shell team labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Triage-needed Triage needed by Cloud Shell team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant