diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-11-07 21:25:52 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-11-08 16:36:27 +0300 |
commit | cc66b4c93bea20220de9ebd4a0b3f686da1d0453 (patch) | |
tree | 7abc36a4236b410cd2a9ee350b52fef84ae7c35b /tests | |
parent | dfabdad54e9a2fc15e37d0b407448390ea701f09 (diff) |
Add support for ssh:// git protocol
Diffstat (limited to 'tests')
-rw-r--r-- | tests/remote-git.testscript | 7 | ||||
-rw-r--r-- | tests/rep-fetch-git-refname.testscript | 1 | ||||
-rw-r--r-- | tests/rep-fetch-git.testscript | 2 | ||||
-rw-r--r-- | tests/rep-fetch.testscript | 8 |
4 files changed, 18 insertions, 0 deletions
diff --git a/tests/remote-git.testscript b/tests/remote-git.testscript index 595220d..a5d3e75 100644 --- a/tests/remote-git.testscript +++ b/tests/remote-git.testscript @@ -54,10 +54,17 @@ remote = $config.bpkg.test.remote mkdir -p $out_git else + # If $git_ssh is not true then testscripts must skip tests that use the ssh + # protocol. Otherwise, it is assumed that the password-less ssh + # authentication is arranged for git.build2.org. + # + git_ssh = $config.bpkg.test.git.ssh + rep_git_https_dumb = "https://build2.org/bpkg/git/$cmd" rep_git_https_smart = "https://git.build2.org/testing/bpkg/advonly/$cmd" rep_git_https_smart_unadv = "https://git.build2.org/testing/bpkg/unadv/$cmd" rep_git_git = "git://git.build2.org/testing/bpkg/unadv/$cmd" + rep_git_ssh = "ssh://git.build2.org/var/scm/testing/bpkg/unadv/$cmd" rep_git = $rep_git_https_dumb # Default remote repository URL. end diff --git a/tests/rep-fetch-git-refname.testscript b/tests/rep-fetch-git-refname.testscript index 88f1e2a..6bb9d57 100644 --- a/tests/rep-fetch-git-refname.testscript +++ b/tests/rep-fetch-git-refname.testscript @@ -65,6 +65,7 @@ if ($git_protocol == 'local' || \ $git_protocol == 'https-smart' || \ + $git_protocol == 'ssh' || \ $git_protocol == 'git') warn2 = "$warn_repo_hist for submodule 'doc/style/basic'$reason_unadv" elif ($git_protocol == 'https-dumb') diff --git a/tests/rep-fetch-git.testscript b/tests/rep-fetch-git.testscript index 3fe0287..8e9d957 100644 --- a/tests/rep-fetch-git.testscript +++ b/tests/rep-fetch-git.testscript @@ -29,6 +29,8 @@ elif ($git_protocol == 'https-smart-unadv') rep = "$rep_git_https_smart_unadv" elif ($git_protocol == 'git') rep = "$rep_git_git" +elif ($git_protocol == 'ssh') + rep = "$rep_git_ssh" else exit "unexpected git protocol '$git_protocol'" end diff --git a/tests/rep-fetch.testscript b/tests/rep-fetch.testscript index c1828a8..8320f70 100644 --- a/tests/rep-fetch.testscript +++ b/tests/rep-fetch.testscript @@ -732,6 +732,14 @@ else git_protocol = 'git' .include rep-fetch-git.testscript } + + : ssh + : + if ($git_ssh == true) + { + git_protocol = 'ssh' + .include rep-fetch-git.testscript + } } : strip-ext |