diff --git a/test/integration/pushWithCredentials/expected/.git_keep/COMMIT_EDITMSG b/test/integration/pushWithCredentials/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..51be8ec3d --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile4 diff --git a/test/integration/pushWithCredentials/expected/.git_keep/FETCH_HEAD b/test/integration/pushWithCredentials/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..6832209cd --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/FETCH_HEAD @@ -0,0 +1 @@ +ff7015f162da19450f2eaf0fc24987104df30e15 branch 'master' of ../actual_remote diff --git a/test/integration/pushWithCredentials/expected/.git_keep/HEAD b/test/integration/pushWithCredentials/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pushWithCredentials/expected/.git_keep/config b/test/integration/pushWithCredentials/expected/.git_keep/config new file mode 100644 index 000000000..821803a3e --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/config @@ -0,0 +1,16 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI +[remote "origin"] + url = ../actual_remote + fetch = +refs/heads/*:refs/remotes/origin/* +[branch "master"] + remote = origin + merge = refs/heads/master diff --git a/test/integration/pushWithCredentials/expected/.git_keep/description b/test/integration/pushWithCredentials/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pushWithCredentials/expected/.git_keep/index b/test/integration/pushWithCredentials/expected/.git_keep/index new file mode 100644 index 000000000..9e081cf47 Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/index differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/info/exclude b/test/integration/pushWithCredentials/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pushWithCredentials/expected/.git_keep/logs/HEAD b/test/integration/pushWithCredentials/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..27c049707 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/logs/HEAD @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 ba8cb1da2a48c38706b15552877d79e8745c4bff CI 1641689920 +1100 commit (initial): myfile1 +ba8cb1da2a48c38706b15552877d79e8745c4bff ff7015f162da19450f2eaf0fc24987104df30e15 CI 1641689920 +1100 commit: myfile2 +ff7015f162da19450f2eaf0fc24987104df30e15 d9ea8db22c1655e9861309cc97139357d20e4e64 CI 1641689920 +1100 commit: myfile3 +d9ea8db22c1655e9861309cc97139357d20e4e64 75c50688e5a8e48a00d1a824124221bcc6aad640 CI 1641689920 +1100 commit: myfile4 diff --git a/test/integration/pushWithCredentials/expected/.git_keep/logs/refs/heads/master b/test/integration/pushWithCredentials/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..27c049707 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 ba8cb1da2a48c38706b15552877d79e8745c4bff CI 1641689920 +1100 commit (initial): myfile1 +ba8cb1da2a48c38706b15552877d79e8745c4bff ff7015f162da19450f2eaf0fc24987104df30e15 CI 1641689920 +1100 commit: myfile2 +ff7015f162da19450f2eaf0fc24987104df30e15 d9ea8db22c1655e9861309cc97139357d20e4e64 CI 1641689920 +1100 commit: myfile3 +d9ea8db22c1655e9861309cc97139357d20e4e64 75c50688e5a8e48a00d1a824124221bcc6aad640 CI 1641689920 +1100 commit: myfile4 diff --git a/test/integration/pushWithCredentials/expected/.git_keep/logs/refs/remotes/origin/master b/test/integration/pushWithCredentials/expected/.git_keep/logs/refs/remotes/origin/master new file mode 100644 index 000000000..463f9add6 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/logs/refs/remotes/origin/master @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 ff7015f162da19450f2eaf0fc24987104df30e15 CI 1641689920 +1100 fetch origin: storing head +ff7015f162da19450f2eaf0fc24987104df30e15 75c50688e5a8e48a00d1a824124221bcc6aad640 CI 1641689925 +1100 update by push diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pushWithCredentials/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pushWithCredentials/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pushWithCredentials/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pushWithCredentials/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/75/c50688e5a8e48a00d1a824124221bcc6aad640 b/test/integration/pushWithCredentials/expected/.git_keep/objects/75/c50688e5a8e48a00d1a824124221bcc6aad640 new file mode 100644 index 000000000..53b925279 Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/75/c50688e5a8e48a00d1a824124221bcc6aad640 differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pushWithCredentials/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pushWithCredentials/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/ba/8cb1da2a48c38706b15552877d79e8745c4bff b/test/integration/pushWithCredentials/expected/.git_keep/objects/ba/8cb1da2a48c38706b15552877d79e8745c4bff new file mode 100644 index 000000000..e6612ab16 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/objects/ba/8cb1da2a48c38706b15552877d79e8745c4bff @@ -0,0 +1,2 @@ +xA +0@Q94#M&XR"~̖r*Jd¬3_pM]zWa>NO$Vf aG8!rgߺJ3, \ No newline at end of file diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pushWithCredentials/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/d9/ea8db22c1655e9861309cc97139357d20e4e64 b/test/integration/pushWithCredentials/expected/.git_keep/objects/d9/ea8db22c1655e9861309cc97139357d20e4e64 new file mode 100644 index 000000000..16633475a Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/d9/ea8db22c1655e9861309cc97139357d20e4e64 differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pushWithCredentials/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/objects/ff/7015f162da19450f2eaf0fc24987104df30e15 b/test/integration/pushWithCredentials/expected/.git_keep/objects/ff/7015f162da19450f2eaf0fc24987104df30e15 new file mode 100644 index 000000000..c79143577 Binary files /dev/null and b/test/integration/pushWithCredentials/expected/.git_keep/objects/ff/7015f162da19450f2eaf0fc24987104df30e15 differ diff --git a/test/integration/pushWithCredentials/expected/.git_keep/refs/heads/master b/test/integration/pushWithCredentials/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..b3746d069 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +75c50688e5a8e48a00d1a824124221bcc6aad640 diff --git a/test/integration/pushWithCredentials/expected/.git_keep/refs/remotes/origin/master b/test/integration/pushWithCredentials/expected/.git_keep/refs/remotes/origin/master new file mode 100644 index 000000000..b3746d069 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/.git_keep/refs/remotes/origin/master @@ -0,0 +1 @@ +75c50688e5a8e48a00d1a824124221bcc6aad640 diff --git a/test/integration/pushWithCredentials/expected/myfile1 b/test/integration/pushWithCredentials/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/pushWithCredentials/expected/myfile2 b/test/integration/pushWithCredentials/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/pushWithCredentials/expected/myfile3 b/test/integration/pushWithCredentials/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/pushWithCredentials/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/pushWithCredentials/expected/myfile4 b/test/integration/pushWithCredentials/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/pushWithCredentials/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/pushWithCredentials/expected_remote/HEAD b/test/integration/pushWithCredentials/expected_remote/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/pushWithCredentials/expected_remote/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/pushWithCredentials/expected_remote/config b/test/integration/pushWithCredentials/expected_remote/config new file mode 100644 index 000000000..c498610f7 --- /dev/null +++ b/test/integration/pushWithCredentials/expected_remote/config @@ -0,0 +1,8 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = true + ignorecase = true + precomposeunicode = true +[remote "origin"] + url = /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/test/integration/pushWithCredentials/./actual diff --git a/test/integration/pushWithCredentials/expected_remote/description b/test/integration/pushWithCredentials/expected_remote/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/pushWithCredentials/expected_remote/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/pushWithCredentials/expected_remote/info/exclude b/test/integration/pushWithCredentials/expected_remote/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/pushWithCredentials/expected_remote/info/exclude @@ -0,0 +1,7 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ +.DS_Store diff --git a/test/integration/pushWithCredentials/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/pushWithCredentials/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 new file mode 100644 index 000000000..7f2ebf4ee Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/pushWithCredentials/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 new file mode 100644 index 000000000..f74bf2335 Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/pushWithCredentials/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce new file mode 100644 index 000000000..0a734f981 Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/pushWithCredentials/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 new file mode 100644 index 000000000..31ae3f5ba Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/75/c50688e5a8e48a00d1a824124221bcc6aad640 b/test/integration/pushWithCredentials/expected_remote/objects/75/c50688e5a8e48a00d1a824124221bcc6aad640 new file mode 100644 index 000000000..53b925279 Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/75/c50688e5a8e48a00d1a824124221bcc6aad640 differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/pushWithCredentials/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 new file mode 100644 index 000000000..285df3e5f Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/pushWithCredentials/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 new file mode 100644 index 000000000..96d2e71a6 Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/ba/8cb1da2a48c38706b15552877d79e8745c4bff b/test/integration/pushWithCredentials/expected_remote/objects/ba/8cb1da2a48c38706b15552877d79e8745c4bff new file mode 100644 index 000000000..e6612ab16 --- /dev/null +++ b/test/integration/pushWithCredentials/expected_remote/objects/ba/8cb1da2a48c38706b15552877d79e8745c4bff @@ -0,0 +1,2 @@ +xA +0@Q94#M&XR"~̖r*Jd¬3_pM]zWa>NO$Vf aG8!rgߺJ3, \ No newline at end of file diff --git a/test/integration/pushWithCredentials/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/pushWithCredentials/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 new file mode 100644 index 000000000..d39fa7d2f Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/d9/ea8db22c1655e9861309cc97139357d20e4e64 b/test/integration/pushWithCredentials/expected_remote/objects/d9/ea8db22c1655e9861309cc97139357d20e4e64 new file mode 100644 index 000000000..16633475a Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/d9/ea8db22c1655e9861309cc97139357d20e4e64 differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/pushWithCredentials/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b new file mode 100644 index 000000000..9b771fc2f Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b differ diff --git a/test/integration/pushWithCredentials/expected_remote/objects/ff/7015f162da19450f2eaf0fc24987104df30e15 b/test/integration/pushWithCredentials/expected_remote/objects/ff/7015f162da19450f2eaf0fc24987104df30e15 new file mode 100644 index 000000000..c79143577 Binary files /dev/null and b/test/integration/pushWithCredentials/expected_remote/objects/ff/7015f162da19450f2eaf0fc24987104df30e15 differ diff --git a/test/integration/pushWithCredentials/expected_remote/packed-refs b/test/integration/pushWithCredentials/expected_remote/packed-refs new file mode 100644 index 000000000..66cf8b589 --- /dev/null +++ b/test/integration/pushWithCredentials/expected_remote/packed-refs @@ -0,0 +1,2 @@ +# pack-refs with: peeled fully-peeled sorted +ff7015f162da19450f2eaf0fc24987104df30e15 refs/heads/master diff --git a/test/integration/pushWithCredentials/expected_remote/refs/heads/master b/test/integration/pushWithCredentials/expected_remote/refs/heads/master new file mode 100644 index 000000000..b3746d069 --- /dev/null +++ b/test/integration/pushWithCredentials/expected_remote/refs/heads/master @@ -0,0 +1 @@ +75c50688e5a8e48a00d1a824124221bcc6aad640 diff --git a/test/integration/pushWithCredentials/recording.json b/test/integration/pushWithCredentials/recording.json new file mode 100644 index 000000000..961945fef --- /dev/null +++ b/test/integration/pushWithCredentials/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":522,"Mod":0,"Key":256,"Ch":80},{"Timestamp":2106,"Mod":0,"Key":256,"Ch":117},{"Timestamp":2210,"Mod":0,"Key":256,"Ch":115},{"Timestamp":2362,"Mod":0,"Key":256,"Ch":101},{"Timestamp":2386,"Mod":0,"Key":256,"Ch":114},{"Timestamp":2474,"Mod":0,"Key":256,"Ch":110},{"Timestamp":2554,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2643,"Mod":0,"Key":256,"Ch":109},{"Timestamp":2706,"Mod":0,"Key":256,"Ch":101},{"Timestamp":2850,"Mod":0,"Key":13,"Ch":13},{"Timestamp":3722,"Mod":0,"Key":256,"Ch":112},{"Timestamp":3787,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3858,"Mod":0,"Key":256,"Ch":115},{"Timestamp":3987,"Mod":0,"Key":256,"Ch":115},{"Timestamp":4131,"Mod":0,"Key":256,"Ch":119},{"Timestamp":4250,"Mod":0,"Key":256,"Ch":111},{"Timestamp":4313,"Mod":0,"Key":256,"Ch":114},{"Timestamp":4433,"Mod":0,"Key":256,"Ch":100},{"Timestamp":4594,"Mod":0,"Key":13,"Ch":13},{"Timestamp":8227,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/pushWithCredentials/setup.sh b/test/integration/pushWithCredentials/setup.sh new file mode 100644 index 000000000..97de49d11 --- /dev/null +++ b/test/integration/pushWithCredentials/setup.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "CI@example.com" +git config user.name "CI" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" + +cd .. +git clone --bare ./actual actual_remote + +cd actual + +echo test3 > myfile3 +git add . +git commit -am "myfile3" +echo test4 > myfile4 +git add . +git commit -am "myfile4" + +git remote add origin ../actual_remote +git fetch origin +git branch --set-upstream-to=origin/master master + +# actually getting a password prompt is tricky: it requires SSH'ing into localhost under a newly created, restricted, user. This is not easy to do in a cross-platform way, nor is it easy to do in a docker container. If you can think of a way to do it, please let me know! +cp ../../../hooks/pre-push .git/hooks/pre-push +chmod +x .git/hooks/pre-push diff --git a/test/integration/pushWithCredentials/test.json b/test/integration/pushWithCredentials/test.json new file mode 100644 index 000000000..2e3b4aedd --- /dev/null +++ b/test/integration/pushWithCredentials/test.json @@ -0,0 +1,4 @@ +{ + "description": "push changes to the remote, with a password prompt", + "speed": 10 +}