From 06687c8a59be6fe5466bf44ae2730354c2daa0e1 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 9 Jan 2022 12:01:27 +1100 Subject: [PATCH] add integration test for entering credentials --- .../expected/.git_keep/COMMIT_EDITMSG | 1 + .../expected/.git_keep/FETCH_HEAD | 1 + .../expected/.git_keep/HEAD | 1 + .../expected/.git_keep/config | 16 ++++++++ .../expected/.git_keep/description | 1 + .../expected/.git_keep/index | Bin 0 -> 353 bytes .../expected/.git_keep/info/exclude | 7 ++++ .../expected/.git_keep/logs/HEAD | 4 ++ .../expected/.git_keep/logs/refs/heads/master | 4 ++ .../.git_keep/logs/refs/remotes/origin/master | 2 + .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 0 -> 52 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 0 -> 21 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 0 -> 103 bytes .../2f/6174050380438f14b16658a356e762435ca591 | Bin 0 -> 128 bytes .../75/c50688e5a8e48a00d1a824124221bcc6aad640 | Bin 0 -> 150 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 0 -> 21 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 0 -> 77 bytes .../ba/8cb1da2a48c38706b15552877d79e8745c4bff | 2 + .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 0 -> 21 bytes .../d9/ea8db22c1655e9861309cc97139357d20e4e64 | Bin 0 -> 150 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 0 -> 21 bytes .../ff/7015f162da19450f2eaf0fc24987104df30e15 | Bin 0 -> 150 bytes .../expected/.git_keep/refs/heads/master | 1 + .../.git_keep/refs/remotes/origin/master | 1 + .../pushWithCredentials/expected/myfile1 | 1 + .../pushWithCredentials/expected/myfile2 | 1 + .../pushWithCredentials/expected/myfile3 | 1 + .../pushWithCredentials/expected/myfile4 | 1 + .../pushWithCredentials/expected_remote/HEAD | 1 + .../expected_remote/config | 8 ++++ .../expected_remote/description | 1 + .../expected_remote/info/exclude | 7 ++++ .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 0 -> 52 bytes .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 0 -> 21 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 0 -> 103 bytes .../2f/6174050380438f14b16658a356e762435ca591 | Bin 0 -> 128 bytes .../75/c50688e5a8e48a00d1a824124221bcc6aad640 | Bin 0 -> 150 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 0 -> 21 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 0 -> 77 bytes .../ba/8cb1da2a48c38706b15552877d79e8745c4bff | 2 + .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 0 -> 21 bytes .../d9/ea8db22c1655e9861309cc97139357d20e4e64 | Bin 0 -> 150 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 0 -> 21 bytes .../ff/7015f162da19450f2eaf0fc24987104df30e15 | Bin 0 -> 150 bytes .../expected_remote/packed-refs | 2 + .../expected_remote/refs/heads/master | 1 + .../pushWithCredentials/recording.json | 1 + test/integration/pushWithCredentials/setup.sh | 37 ++++++++++++++++++ .../integration/pushWithCredentials/test.json | 4 ++ 49 files changed, 109 insertions(+) create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/COMMIT_EDITMSG create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/FETCH_HEAD create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/HEAD create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/config create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/description create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/index create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/info/exclude create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/logs/HEAD create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/logs/refs/heads/master create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/logs/refs/remotes/origin/master create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/75/c50688e5a8e48a00d1a824124221bcc6aad640 create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/ba/8cb1da2a48c38706b15552877d79e8745c4bff create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/d9/ea8db22c1655e9861309cc97139357d20e4e64 create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/objects/ff/7015f162da19450f2eaf0fc24987104df30e15 create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/refs/heads/master create mode 100644 test/integration/pushWithCredentials/expected/.git_keep/refs/remotes/origin/master create mode 100644 test/integration/pushWithCredentials/expected/myfile1 create mode 100644 test/integration/pushWithCredentials/expected/myfile2 create mode 100644 test/integration/pushWithCredentials/expected/myfile3 create mode 100644 test/integration/pushWithCredentials/expected/myfile4 create mode 100644 test/integration/pushWithCredentials/expected_remote/HEAD create mode 100644 test/integration/pushWithCredentials/expected_remote/config create mode 100644 test/integration/pushWithCredentials/expected_remote/description create mode 100644 test/integration/pushWithCredentials/expected_remote/info/exclude create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/2f/6174050380438f14b16658a356e762435ca591 create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/75/c50688e5a8e48a00d1a824124221bcc6aad640 create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/ba/8cb1da2a48c38706b15552877d79e8745c4bff create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/d9/ea8db22c1655e9861309cc97139357d20e4e64 create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b create mode 100644 test/integration/pushWithCredentials/expected_remote/objects/ff/7015f162da19450f2eaf0fc24987104df30e15 create mode 100644 test/integration/pushWithCredentials/expected_remote/packed-refs create mode 100644 test/integration/pushWithCredentials/expected_remote/refs/heads/master create mode 100644 test/integration/pushWithCredentials/recording.json create mode 100644 test/integration/pushWithCredentials/setup.sh create mode 100644 test/integration/pushWithCredentials/test.json 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 0000000000000000000000000000000000000000..9e081cf47d96eb3e0b88a5f8c459f191a14894c7 GIT binary patch literal 353 zcmZ?q402{*U|<4bmc(1ep87YHOF^_=T(l)40|P7L?~ivF7#f!_Ffe`vsu2NVwxxR> z|5Z)B@g*WOiYMRcLV#CG_f-b=+{(1foK!=g0+4<~_xpNa^Il4`L(RF1ZjJ=c52FU9 zedk`TS`=Q@-||X(zJ)r>93!YXM(gj$gUt)5*aJ1^9=bXAvw5}8ls$XHe@fwyx`3Cz z#;zmMFmsHd=9uV8J^`6yv};2()SUb1=3Fv4`XKzD(Xp~u=`T)Od`XJE^*RJ*jtS75 zkRVrAASKCQqF}(KpIE}m+~C|VvN0`UaoF=D=a{7vy&_h6%v+q=qo5^f7{5(mqQev2 FLIAcGb-w@r literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e GIT binary patch literal 52 zcmb~ZE#08nZNMgRZ+ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..0a734f98100d24e67455a3cfa8497adaccc7a422 GIT binary patch literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8UTCqE3ZN5G4lWb literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..31ae3f5ba89b96ad2e268134913bd913a0bc46d9 GIT binary patch literal 128 zcmV-`0Du2@0V^p=O;s>7F<>w>FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL i8byf-!zGiW55oT$9V>g4{^GR7m!#NRuR{Q5NjxpS$UUzB literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..53b925279ef9501edbdaaa19c5256653b5bd8955 GIT binary patch literal 150 zcmV;H0BQet0gcW<3c@fDKvCB@MfQTsBs0?thzMQv7->4ig0ZDU(A(Q1xc$7vFKew! z^Qd%cyO|HOU`N0Z6HrVu(ug9Qa%8bi0!1#F72TG1do@3)`~^A08nuUMF0Q* literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..96d2e71a6af75cdd27ac5d9628a27faecc40fb66 GIT binary patch literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..d39fa7d2fecf1c45a132dfe3a8758952f3c8d968 GIT binary patch literal 21 ccmb}lpN08nuUO8@`> literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..16633475a798bfab053b7262d6812b35aa89039b GIT binary patch literal 150 zcmV;H0BQet0gaA93d0}}MZ5MC?h9qcQKJw_A*&q2=nM_SCIk!Z?duV``tW!>e%@^Q(){RO101vG? Em>`CU&08otwO#lD@ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..c791435775c52a49830b32c6485640fc83c5510e GIT binary patch literal 150 zcmV;H0BQet0gaA93c@fD06pgwxeJorCYvmX2%h?kO|rp)u~H)F@9h)34#O~I?R^;* z*dNBGY9&q{Bye-Jsx~H8;+AQmghUlFyM`Xfykyhouvt>cPzA-OGNtG!LkIy=j5V^R z=tJ?jH6!nFUpIT3?fEue^&|cD&{J9a#RBcY#Ei}!0h}{C-KU2Bshj?7%R|xp0M+d} EJZ1DsF8}}l literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e GIT binary patch literal 52 zcmb~ZE#08nZNMgRZ+ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..0a734f98100d24e67455a3cfa8497adaccc7a422 GIT binary patch literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8UTCqE3ZN5G4lWb literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..31ae3f5ba89b96ad2e268134913bd913a0bc46d9 GIT binary patch literal 128 zcmV-`0Du2@0V^p=O;s>7F<>w>FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL i8byf-!zGiW55oT$9V>g4{^GR7m!#NRuR{Q5NjxpS$UUzB literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..53b925279ef9501edbdaaa19c5256653b5bd8955 GIT binary patch literal 150 zcmV;H0BQet0gcW<3c@fDKvCB@MfQTsBs0?thzMQv7->4ig0ZDU(A(Q1xc$7vFKew! z^Qd%cyO|HOU`N0Z6HrVu(ug9Qa%8bi0!1#F72TG1do@3)`~^A08nuUMF0Q* literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..96d2e71a6af75cdd27ac5d9628a27faecc40fb66 GIT binary patch literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..d39fa7d2fecf1c45a132dfe3a8758952f3c8d968 GIT binary patch literal 21 ccmb}lpN08nuUO8@`> literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..16633475a798bfab053b7262d6812b35aa89039b GIT binary patch literal 150 zcmV;H0BQet0gaA93d0}}MZ5MC?h9qcQKJw_A*&q2=nM_SCIk!Z?duV``tW!>e%@^Q(){RO101vG? Em>`CU&08otwO#lD@ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..c791435775c52a49830b32c6485640fc83c5510e GIT binary patch literal 150 zcmV;H0BQet0gaA93c@fD06pgwxeJorCYvmX2%h?kO|rp)u~H)F@9h)34#O~I?R^;* z*dNBGY9&q{Bye-Jsx~H8;+AQmghUlFyM`Xfykyhouvt>cPzA-OGNtG!LkIy=j5V^R z=tJ?jH6!nFUpIT3?fEue^&|cD&{J9a#RBcY#Ei}!0h}{C-KU2Bshj?7%R|xp0M+d} EJZ1DsF8}}l literal 0 HcmV?d00001 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 +}