1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
Commit graph

33 commits

Author SHA1 Message Date
Mike Pountney
eef9a6c630 Replace Fog::Time with Time
For some reason, our tests are now returning regular Time
objects in both Real and Mock mode.
2014-09-23 22:41:22 +01:00
Mike Pountney
2186bf73ef Fix error in assumption about TaskRecord queries
Task records as returned by the Query API have 'name' parameter
equal to the 'operation_name' parameter of the Model object (and
OperationName value of the get_task request)

This commit documents that difference in the test, and corrects
the get_execute_query Mock to mirror the behaviour.
2014-09-23 22:39:24 +01:00
Mike Pountney
b1413f4422 no mock for custom_fields 2014-09-23 21:45:29 +01:00
Mike Pountney
4fd6c2289e Fix up tasks_tests; add missing data from Mock 2014-09-23 19:31:01 +01:00
Mike Pountney
ef03cb7292 Add query support to tasks model, inc Mock 2014-09-23 19:31:01 +01:00
Mike Pountney
b33148cba4 Enable Mock support for Model task tests 2014-09-23 19:31:01 +01:00
Mike Pountney
36c1e6dc7d Enable model vapp_tests in Mock mode 2014-09-23 19:31:01 +01:00
Mike Pountney
48c382d20a Add Query support to Vms 2014-09-23 19:31:01 +01:00
Mike Pountney
a440f3d6b9 find_by_query support for vdcs collection 2014-09-23 19:31:00 +01:00
Mike Pountney
6537947a40 Mock vdc model tests are passing 2014-09-23 19:31:00 +01:00
Mike Pountney
65a10cae67 Solid query API mixin, with tests
Preloads :id, and :name if available. Leaves everything else up to lazy-loading, though optionally can call a per-collection function to add more values if available
2014-09-23 19:31:00 +01:00
Simas Cepaitis
bb7c925641 Add couple of functions and tests 2014-06-19 09:51:13 +01:00
Paul Thornthwaite
ec8b940b2c Standardise on collection methods
Done with `rubocop --auto-correct --only CollectionMethods`
2014-05-26 16:22:07 +01:00
Mike Pountney
6bedc5f3b4 Add is_shared attribute to network Model
is_shared reports whether a network is shared across all
vDCs within an organization, or just within the vDC it is defined in.
2014-02-26 10:34:42 +00:00
Mike Pountney
cb9802b239 Add fence_mode to network model
fence_mode can be 'isolated' (disconnected from EdgeGateway) or
'natRouted' (connected to NatService on EdgeGateway).

The network types differ significantly enough to have a separate
set of tests, to be expanded later.
2014-02-26 10:32:44 +00:00
Mike Pountney
4c46c1de10 Switch network model over to get_network_complete
This has also fixed an issue where undefined attributes in the
request output were not being unmarked as NonLoaded. Test adjusted
accordingly.

In addition, highlighted that we need the ensure_list! hack on
IpRanges->IpRange.
2014-02-25 08:56:51 +00:00
Mike Pountney
ef8c259730 Add network model tests
Largely based on the vapp tests, except for explicitly
trying to find a suitable network to test against rather than
just blindly picking the first.

Test lazy loading is working, and that values loaded match
our data from the raw service request.

Lazy loading unfortunately complicates testing as per the
current implementation - determining that the loading has
happened is on a field-by-field basis, which leaves fields
that are undefined in vCloud in a 'NonLoaded' state. Possibly worth
revisiting this logic in a separate commit.
2014-02-24 08:44:45 +00:00
Nick Osborn
8b8a961f2e [vcloud_director] Fix medias#create - issue #2440 2013-12-02 13:44:14 +00:00
Dan Abel
f284ba6d19 [vcloud_director] tests become pending not failing on absense of testable resources 2013-11-13 14:41:16 +00:00
Dan Abel
8837189b7a [vcloud_director] fix models vms_test so is pending on empty environment 2013-11-12 12:44:27 +00:00
Nick Osborn
353b50acfc [vcloud_director] Do ensure_list in request methods.
Mitigation for Fog::ToHashDocument. This is (still) a short-term fix
until we get to real response parsers.
2013-10-15 14:14:05 +01:00
Nick Osborn
f6a45470e0 [vcloud_director] Remove vcr. 2013-10-09 09:08:50 +01:00
Nick Osborn
e94014d9c3 [vcloud_director|tests] Fix some edge cases. 2013-10-01 16:24:44 +01:00
Nick Osborn
73f5cd76f2 [vcloud_director] Add tests for task model. 2013-10-01 03:25:52 +01:00
Nick Osborn
67c0d0b9fe [vcloud_director] Add basic media model. 2013-10-01 02:36:20 +01:00
Nick Osborn
1f9837c865 [vcloud_director] Start mocking requests.
- also adds get_current_session request
2013-09-26 11:31:19 +01:00
Nick Osborn
c445930eff [vcloud_director|tests] Make tests work 2013-09-24 21:08:43 +01:00
Nick Osborn
23fabeb9eb [vcloud_director|tests] mv *_test.rb *.tests.rb 2013-09-24 21:08:06 +01:00
Nick Osborn
bc47d97e0d [vcloud_director|tests] Don't hardcode API host. 2013-09-24 21:07:11 +01:00
Nick Osborn
193ac3e856 [vcloud_director] Integrate tests
- add tags for `rake test`
- use `tests/.fog` not bespoke environment variables
- vapp_life_cycle_tests made pending; extra requests arise after
  71a303415b
2013-09-13 19:28:58 +01:00
Paul Thornthwaite
d9fe97bd37 [#2112] Allows non VCR HTTP connections
This is a temporary solution. The VCR config which globally affects all
providers should not be isolated under one provider.
2013-09-04 10:20:07 +01:00
Rodrigo Estebanez
926495e9f0 Make VcloudDirector to support 5.1. Default version now is 5.1 2013-08-29 14:02:21 +02:00
Rodrigo Estebanez
063678f840 Rename Vcloudng to VcloudDirector 2013-08-27 11:19:54 +02:00