mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-25 18:55:28 -06:00
add integration test for entering credentials
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
myfile4
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ff7015f162da19450f2eaf0fc24987104df30e15 branch 'master' of ../actual_remote
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ref: refs/heads/master
|
||||||
@@ -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
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Unnamed repository; edit this file 'description' to name the repository.
|
||||||
BIN
test/integration/pushWithCredentials/expected/.git_keep/index
Normal file
BIN
test/integration/pushWithCredentials/expected/.git_keep/index
Normal file
Binary file not shown.
@@ -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
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
0000000000000000000000000000000000000000 ba8cb1da2a48c38706b15552877d79e8745c4bff CI <CI@example.com> 1641689920 +1100 commit (initial): myfile1
|
||||||
|
ba8cb1da2a48c38706b15552877d79e8745c4bff ff7015f162da19450f2eaf0fc24987104df30e15 CI <CI@example.com> 1641689920 +1100 commit: myfile2
|
||||||
|
ff7015f162da19450f2eaf0fc24987104df30e15 d9ea8db22c1655e9861309cc97139357d20e4e64 CI <CI@example.com> 1641689920 +1100 commit: myfile3
|
||||||
|
d9ea8db22c1655e9861309cc97139357d20e4e64 75c50688e5a8e48a00d1a824124221bcc6aad640 CI <CI@example.com> 1641689920 +1100 commit: myfile4
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
0000000000000000000000000000000000000000 ba8cb1da2a48c38706b15552877d79e8745c4bff CI <CI@example.com> 1641689920 +1100 commit (initial): myfile1
|
||||||
|
ba8cb1da2a48c38706b15552877d79e8745c4bff ff7015f162da19450f2eaf0fc24987104df30e15 CI <CI@example.com> 1641689920 +1100 commit: myfile2
|
||||||
|
ff7015f162da19450f2eaf0fc24987104df30e15 d9ea8db22c1655e9861309cc97139357d20e4e64 CI <CI@example.com> 1641689920 +1100 commit: myfile3
|
||||||
|
d9ea8db22c1655e9861309cc97139357d20e4e64 75c50688e5a8e48a00d1a824124221bcc6aad640 CI <CI@example.com> 1641689920 +1100 commit: myfile4
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
0000000000000000000000000000000000000000 ff7015f162da19450f2eaf0fc24987104df30e15 CI <CI@example.com> 1641689920 +1100 fetch origin: storing head
|
||||||
|
ff7015f162da19450f2eaf0fc24987104df30e15 75c50688e5a8e48a00d1a824124221bcc6aad640 CI <CI@example.com> 1641689925 +1100 update by push
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
x<01><>A
|
||||||
|
<EFBFBD>0@Q<>9<EFBFBD><39><05><><EFBFBD>4<11><>#M&X<><58>R"<22><><EFBFBD><11>~<1E><>̖<0E>r<EFBFBD><72>*<2A>J<EFBFBD><4A>d<1E><>¬<14><04><><EFBFBD><EFBFBD>3_<33>pM<70><4D>]z<>W<EFBFBD>a<EFBFBD><61>>NO<4E>$<24>V<EFBFBD><56>f a<><10>G8!<21><><1E><>rgߺ<67>J<EFBFBD>3<>,<2C>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
75c50688e5a8e48a00d1a824124221bcc6aad640
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
75c50688e5a8e48a00d1a824124221bcc6aad640
|
||||||
1
test/integration/pushWithCredentials/expected/myfile1
Normal file
1
test/integration/pushWithCredentials/expected/myfile1
Normal file
@@ -0,0 +1 @@
|
|||||||
|
test1
|
||||||
1
test/integration/pushWithCredentials/expected/myfile2
Normal file
1
test/integration/pushWithCredentials/expected/myfile2
Normal file
@@ -0,0 +1 @@
|
|||||||
|
test2
|
||||||
1
test/integration/pushWithCredentials/expected/myfile3
Normal file
1
test/integration/pushWithCredentials/expected/myfile3
Normal file
@@ -0,0 +1 @@
|
|||||||
|
test3
|
||||||
1
test/integration/pushWithCredentials/expected/myfile4
Normal file
1
test/integration/pushWithCredentials/expected/myfile4
Normal file
@@ -0,0 +1 @@
|
|||||||
|
test4
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ref: refs/heads/master
|
||||||
@@ -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
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Unnamed repository; edit this file 'description' to name the repository.
|
||||||
@@ -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
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
x<01><>A
|
||||||
|
<EFBFBD>0@Q<>9<EFBFBD><39><05><><EFBFBD>4<11><>#M&X<><58>R"<22><><EFBFBD><11>~<1E><>̖<0E>r<EFBFBD><72>*<2A>J<EFBFBD><4A>d<1E><>¬<14><04><><EFBFBD><EFBFBD>3_<33>pM<70><4D>]z<>W<EFBFBD>a<EFBFBD><61>>NO<4E>$<24>V<EFBFBD><56>f a<><10>G8!<21><><1E><>rgߺ<67>J<EFBFBD>3<>,<2C>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
# pack-refs with: peeled fully-peeled sorted
|
||||||
|
ff7015f162da19450f2eaf0fc24987104df30e15 refs/heads/master
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
75c50688e5a8e48a00d1a824124221bcc6aad640
|
||||||
1
test/integration/pushWithCredentials/recording.json
Normal file
1
test/integration/pushWithCredentials/recording.json
Normal file
@@ -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}]}
|
||||||
37
test/integration/pushWithCredentials/setup.sh
Normal file
37
test/integration/pushWithCredentials/setup.sh
Normal file
@@ -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
|
||||||
4
test/integration/pushWithCredentials/test.json
Normal file
4
test/integration/pushWithCredentials/test.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"description": "push changes to the remote, with a password prompt",
|
||||||
|
"speed": 10
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user