aboutsummaryrefslogtreecommitdiff
path: root/test/git-lfs
diff options
context:
space:
mode:
Diffstat (limited to 'test/git-lfs')
-rw-r--r--test/git-lfs/autoPullDisabled.sh11
-rw-r--r--test/git-lfs/autoPullEnabled.sh11
-rw-r--r--test/git-lfs/scenarios.json22
3 files changed, 44 insertions, 0 deletions
diff --git a/test/git-lfs/autoPullDisabled.sh b/test/git-lfs/autoPullDisabled.sh
new file mode 100644
index 0000000..787781c
--- /dev/null
+++ b/test/git-lfs/autoPullDisabled.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "target file exists" cat big-file-1.txt
+check "lfs file has not been expanded" cat "big-file-1.txt" | grep "git-lfs\.github\.com"
+
+reportResults \ No newline at end of file
diff --git a/test/git-lfs/autoPullEnabled.sh b/test/git-lfs/autoPullEnabled.sh
new file mode 100644
index 0000000..8cdce3f
--- /dev/null
+++ b/test/git-lfs/autoPullEnabled.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+# Optional: Import test library
+source dev-container-features-test-lib
+
+check "target file exists" cat big-file-1.txt
+check "lfs file has been expanded" cat "big-file-1.txt" | grep "this is test file 1"
+
+reportResults \ No newline at end of file
diff --git a/test/git-lfs/scenarios.json b/test/git-lfs/scenarios.json
new file mode 100644
index 0000000..6cc3c24
--- /dev/null
+++ b/test/git-lfs/scenarios.json
@@ -0,0 +1,22 @@
+{
+ "autoPullEnabled": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
+ "initializeCommand": "(GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/devcontainers/git-lfs-example /tmp/testRepo-1 || true) && (cp -r /tmp/testRepo-1/.git* . && cp -r /tmp/testRepo-1/* .)",
+ "remoteUser": "vscode",
+ "features": {
+ "git-lfs": {
+ "autoPull": true
+ }
+ }
+ },
+ "autoPullDisabled": {
+ "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
+ "initializeCommand": "(GIT_LFS_SKIP_SMUDGE=1 git clone https://github.com/devcontainers/git-lfs-example /tmp/testRepo-2 || true) && (cp -r /tmp/testRepo-2/.git* . && cp -r /tmp/testRepo-2/* .)",
+ "remoteUser": "vscode",
+ "features": {
+ "git-lfs": {
+ "autoPull": false
+ }
+ }
+ }
+} \ No newline at end of file