Skip to content

Commit 0bcb9a9

Browse files
authored
Add tests for DevTool (#41)
* Add tests for DevTool Do not expect they will pass due to internal requirement * Fix weird character * Install tar on Mariner
1 parent 9c912d7 commit 0bcb9a9

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

.github/workflows/test-all.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
matrix:
1414
features:
1515
- artifacts-helper
16+
- devtool
1617
- docfx
1718
- external-repository
1819
- microsoft-git

.github/workflows/test-pr.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
with:
1717
filters: |
1818
artifacts-helper: ./**/artifacts-helper/**
19+
devtool: ./**/devtool/**
1920
docfx: ./**/docfx/**
2021
external-repository: ./**/external-repository/**
2122
microsoft-git: ./**/microsoft-git/**

src/devtool/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
]
1414
}
1515
},
16-
"postCreateCommand": "curl sL https://aka.ms/InstallToolLinux.sh | sh -s DevTool"
16+
"postCreateCommand": "curl -sL https://aka.ms/InstallToolLinux.sh | sh -s DevTool"
1717
}

src/devtool/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ check_packages() {
3131
export DEBIAN_FRONTEND=noninteractive
3232

3333
if [ "${ID}" = "mariner" ]; then
34-
tdnf install -y curl ca-certificates
34+
tdnf install -y curl ca-certificates tar
3535
tdnf clean all
3636
else
3737
check_packages curl ca-certificates xdg-utils

test/devtool/test.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library bundled with the devcontainer CLI
6+
source dev-container-features-test-lib
7+
8+
# Feature-specific tests
9+
check "dev" dev --version
10+
11+
12+
# Report results
13+
# If any of the checks above exited with a non-zero exit code, the test will fail.
14+
reportResults

0 commit comments

Comments
 (0)