Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
added tests for GcpMemorystoreMemcache resource
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettPowell committed Mar 31, 2021
1 parent 00a4b1e commit d65ae7f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from rpe.resources.gcp import GcpComputeSubnetwork
from rpe.resources.gcp import GcpDataflowJob
from rpe.resources.gcp import GcpMemorystoreRedis
from rpe.resources.gcp import GcpMemorystoreMemcache

test_project = "my_project"
test_resource_name = "my_resource"
Expand Down Expand Up @@ -255,6 +256,16 @@
resource_type='redis.googleapis.com/Instance',
name='//redis.googleapis.com/projects/my_project/locations/us-central1/instances/my_resource'
),
ResourceTestCase(
resource_data={
'name': test_resource_name,
'location': 'us-central1',
'project_id': test_project
},
cls=GcpMemorystoreMemcache,
resource_type='memcache.googleapis.com/Instance',
name='//memcache.googleapis.com/projects/my_project/locations/us-central1/instances/my_resource'
),
]


Expand Down
8 changes: 8 additions & 0 deletions tests/test_resources_cai.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from rpe.resources.gcp import GcpIamServiceAccountKey
from rpe.resources.gcp import GcpDataflowJob
from rpe.resources.gcp import GcpMemorystoreRedis
from rpe.resources.gcp import GcpMemorystoreMemcache

client_kwargs = {
'credentials': Credentials(token='')
Expand Down Expand Up @@ -220,6 +221,13 @@
},
resource_cls=GcpMemorystoreRedis
),
CaiTestCase(
data={
"name": "//memcache.googleapis.com/projects/test-project/locations/us-central1/instances/test-resource",
"asset_type": "memcache.googleapis.com/Instance",
},
resource_cls=GcpMemorystoreMemcache
),
]


Expand Down

0 comments on commit d65ae7f

Please sign in to comment.