Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
!bug

* **allow ssh transport protocol** ([#3237](#3237))

  Fix regression introduced by commit [0a09069](0a09069).
  Allow install module from git private repository with SSH transport URI (e.g ssh://git@mygitlabserver:12345/namespace/myprivatemod.git)
  • Loading branch information
mcarrolle committed May 7, 2024
1 parent 623eebd commit 96ad8ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bolt/module_installer/specs/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def initialize(init_hash, config = {})

unless valid_url?(@git)
raise Bolt::ValidationError,
"Invalid URI #{@git}. Valid URIs must begin with 'git@', 'http://', or 'https://'."
"Invalid URI #{@git}. Valid URIs must begin with 'git@', 'http://', 'https://' or 'ssh://'."
end
end

Expand Down
5 changes: 5 additions & 0 deletions spec/unit/module_installer/specs/git_spec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
/Option 'resolve'.*must be a Boolean/
)
end

it 'allow ssh URI' do
init_hash['git'] = 'ssh://myuser@github.com:12345/puppetlabs/puppetlabs-yaml'
expect { spec }.not_to raise_error
end
end

context '#to_hash' do
Expand Down

0 comments on commit 96ad8ae

Please sign in to comment.