Skip to content

Commit 6c2f6a0

Browse files
authored
Add test project (#23)
1 parent 8986428 commit 6c2f6a0

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ help: ## show this help
44
| column -t -s '|'
55

66
test-bash-completion: ## test the bash-completion feature
7-
devcontainer features test -f bash-completion -i mcr.microsoft.com/devcontainers/base:ubuntu .
7+
devcontainer features test -f bash-completion -i mcr.microsoft.com/devcontainers/base:ubuntu .
8+
9+
test-project-sync: ## Sync the feature code to the test project
10+
rm -rf test-project/.devcontainer/src
11+
cp -r src test-project/.devcontainer/src
12+
13+
test-project-build: test-project-sync ## Build the test project
14+
@echo "Building the test project..."
15+
echo "" | devcontainer build --workspace-folder test-project | cat
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/ubuntu
3+
{
4+
"name": "devcontainer-features-playground-test1",
5+
"image": "mcr.microsoft.com/vscode/devcontainers/base:0-jammy",
6+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
7+
// "forwardPorts": [],
8+
// Use 'postCreateCommand' to run commands after the container is created.
9+
// "postCreateCommand": "uname -a",
10+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
11+
"remoteUser": "vscode",
12+
"features": {
13+
"ghcr.io/devcontainers-extra/features/fish-apt-get": {},
14+
"./src/shell-history": {},
15+
"./src/azure-cli-persistence": {}
16+
}
17+
}

test-project/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# test-project
2+
3+
This folder contains a test project for interactively testing the dev container features in this repo.
4+
5+
The `Makefile` in the project root contains targets for syncing the dev container features to the test project, and for building the dev container with the features. See `test-project-sync` and `test-project-build`.

0 commit comments

Comments
 (0)