forked from fog/fog-google
-
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.
[shindo-minitest] convert TargetHttpProxies tests to minitest, includ…
…ing a few bug fixes in the implementation of TargetHttpProxies
- Loading branch information
Isaac Hollander McCreery
committed
May 28, 2015
1 parent
2c2acef
commit 4e1d5dd
Showing
4 changed files
with
37 additions
and
3 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
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,19 @@ | ||
require "factories/collection_factory" | ||
require "factories/url_maps_factory" | ||
|
||
class TargetHttpProxiesFactory < CollectionFactory | ||
def initialize(example) | ||
@url_maps = UrlMapsFactory.new(example) | ||
super(Fog::Compute[:google].target_http_proxies, example) | ||
end | ||
|
||
def cleanup | ||
super | ||
@url_maps.cleanup | ||
end | ||
|
||
def params | ||
params = {:name => resource_name, | ||
:url_map => @url_maps.create.self_link} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require "minitest_helper" | ||
require "helpers/test_collection" | ||
require "factories/target_http_proxies_factory" | ||
|
||
class TestTargetHttpProxies < FogIntegrationTest | ||
include TestCollection | ||
|
||
def setup | ||
@subject = Fog::Compute[:google].target_http_proxies | ||
@factory = TargetHttpProxiesFactory.new(namespaced_name) | ||
end | ||
end |