mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
Restore removed google modules (#675)
* Revert "Remove entries of modules that no longer exist." partially. This reverts commitc1e1b37da4
. * Revert "The _info module is in google.cloud." This reverts commit26f5c84924
. * Revert "Remove modules that were moved to the google.cloud collection according to ansible/ansible's ansible_builtin_runtime.yml." This reverts commita1442ccc35
. * Fix FQCNs in examples and module references. * Add changelog fragment. * Update ignore.txt. * Remove bad lines.
This commit is contained in:
parent
52cce0b7af
commit
7ac467a359
18 changed files with 1804 additions and 169 deletions
|
@ -0,0 +1,30 @@
|
|||
import unittest
|
||||
|
||||
from ansible_collections.community.general.plugins.modules.cloud.google.gcp_forwarding_rule import _build_global_forwarding_rule_dict
|
||||
|
||||
|
||||
class TestGCPFowardingRule(unittest.TestCase):
|
||||
"""Unit tests for gcp_fowarding_rule module."""
|
||||
params_dict = {
|
||||
'forwarding_rule_name': 'foo_fowarding_rule_name',
|
||||
'address': 'foo_external_address',
|
||||
'target': 'foo_targetproxy',
|
||||
'region': 'global',
|
||||
'port_range': 80,
|
||||
'protocol': 'TCP',
|
||||
'state': 'present',
|
||||
}
|
||||
|
||||
def test__build_global_forwarding_rule_dict(self):
|
||||
|
||||
expected = {
|
||||
'name': 'foo_fowarding_rule_name',
|
||||
'IPAddress': 'https://www.googleapis.com/compute/v1/projects/my-project/global/addresses/foo_external_address',
|
||||
'target': 'https://www.googleapis.com/compute/v1/projects/my-project/global/targetHttpProxies/foo_targetproxy',
|
||||
'region': 'global',
|
||||
'portRange': 80,
|
||||
'IPProtocol': 'TCP',
|
||||
}
|
||||
actual = _build_global_forwarding_rule_dict(
|
||||
self.params_dict, 'my-project')
|
||||
self.assertEqual(expected, actual)
|
Loading…
Add table
Add a link
Reference in a new issue