This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new aa59d230 Fix up tests for updates proxy wrapper
aa59d230 is described below
commit aa59d230683bde8d28c525d736515756505c0e44
Author: Sebb <[email protected]>
AuthorDate: Thu Mar 28 23:21:29 2024 +0000
Fix up tests for updates proxy wrapper
---
lib/spec/lib/svn_spec.rb | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/lib/spec/lib/svn_spec.rb b/lib/spec/lib/svn_spec.rb
index 8fd9059e..82d37667 100644
--- a/lib/spec/lib/svn_spec.rb
+++ b/lib/spec/lib/svn_spec.rb
@@ -328,24 +328,37 @@ describe ASF::SVN do
end
end
- it "_svn_build_cmd('help', 'path', {user: 'whimsysvn'}) should include
username" do
+ it "_svn_build_cmd('help', 'path', {user: 'whimsysvn'}) should not include
username" do
cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: 'whimsysvn'})
expect(stdin).to eq(nil)
- cmd.shift # don't make assumptions about the exact SVN command
- expect(cmd).to eq(["help", "--non-interactive", ["--username",
"whimsysvn", "--no-auth-cache"], "--", "path"])
+ expect(cmd).to eq(["whimsysvn", "help", "--non-interactive", "--",
"path"])
end
- it "_svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: false})
should include username" do
+ it "_svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: false})
should not include username" do
cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: 'whimsysvn',
dryrun: false})
expect(stdin).to eq(nil)
- cmd.shift # don't make assumptions about the exact SVN command
- expect(cmd).to eq(["help", "--non-interactive", ["--username",
"whimsysvn", "--no-auth-cache"], "--", "path"])
+ expect(cmd).to eq(["whimsysvn", "help", "--non-interactive", "--",
"path"])
end
it "_svn_build_cmd('help', 'path', {user: 'whimsysvn', dryrun: true})
should not include username" do
cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: 'whimsysvn',
dryrun: true})
+ expect(cmd).to eq(["whimsysvn", "help", "--non-interactive", "--",
"path"])
+ end
+
+ it "_svn_build_cmd('help', 'path', {user: '_dummy_', password:
'password'}) should include username" do
+ cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: '_dummy_',
password: 'password'})
+ expect(stdin).to eq('password')
+ expect(cmd).to eq(["svn", "help", "--non-interactive", ["--username",
"_dummy_", "--no-auth-cache"], ["--password-from-stdin"], "--", "path"])
+ end
+
+ it "_svn_build_cmd('help', 'path', {user: '_dummy_', password: 'password',
dryrun: false}) should include username" do
+ cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: '_dummy_',
password: 'password', dryrun: false})
+ expect(stdin).to eq('password')
+ expect(cmd).to eq(["svn", "help", "--non-interactive", ["--username",
"_dummy_", "--no-auth-cache"], ["--password-from-stdin"], "--", "path"])
+ end
+ it "_svn_build_cmd('help', 'path', {user: '_dummy_', dryrun: true}) should
not include username" do
+ cmd, stdin = ASF::SVN._svn_build_cmd('help', 'path', {user: '_dummy_',
dryrun: true})
expect(stdin).to eq(nil)
- cmd.shift # don't make assumptions about the exact SVN command
- expect(cmd).to eq(["help", "--non-interactive", "--", "path"])
+ expect(cmd).to eq(["svn", "help", "--non-interactive", "--", "path"])
end
it "_svn_build_cmd('help', 'path', {_error: true}) should raise error" do