forked from ManageIQ/manageiq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ManageIQ#18131 from jerryk55/fix_merged_uri
Fix Exception due to missing #merged_uri parameters in FileDepot parent class
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ def upload_file(file) | |
@file = file | ||
end | ||
|
||
def merged_uri | ||
def merged_uri(_uri, _api_port) | ||
uri | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
describe FileDepotNfs do | ||
let(:uri) { "nfs://foo.com/directory" } | ||
let(:swift_uri) { "swift://foo_bucket/doo_directory" } | ||
let(:file_depot_nfs) { FileDepotNfs.new(:uri => uri) } | ||
|
||
it "should return a valid prefix" do | ||
expect(FileDepotNfs.uri_prefix).to eq "nfs" | ||
end | ||
|
||
describe "#merged_uri" do | ||
before do | ||
file_depot_nfs.uri = uri | ||
end | ||
|
||
it "should return the uri set on the depot object and ignore the uri parameter" do | ||
expect(file_depot_nfs.merged_uri(swift_uri, nil)).to eq uri | ||
end | ||
|
||
it "should return the uri set on the depot object and ignore an empty uri parameter" do | ||
expect(file_depot_nfs.merged_uri(nil, nil)).to eq uri | ||
end | ||
end | ||
end |