Drop mox usage from VPNaaS panel tests

AddEndpointGroup workflow previously passes 'subnets' and 'cidrs'
in "context" data to endpointgroup_create(), but precisely speaking
this is not correct (even though endpointgroup_create() does filtering
inside the function). After mock introduction, arguments are checked
more stricly and it is tricky to have 'subnets' and 'cidrs' in
assert_called_once_with, so this commit changes the arguments in
the AddEndpointGroup workflow.

This is part of mox-removal community goal in Rocky.

Partial-Bug: #1753504
Change-Id: Ida3a5fdad267144392aba946c089113c478c4405
This commit is contained in:
Akihiro Motoki 2018-03-05 08:12:47 +09:00
parent 0087e89e44
commit 6cbdee8340
2 changed files with 352 additions and 328 deletions

File diff suppressed because it is too large Load Diff

View File

@ -209,7 +209,11 @@ class AddEndpointGroup(workflows.Workflow):
def handle(self, request, context):
try:
api_vpn.endpointgroup_create(request, **context)
api_vpn.endpointgroup_create(request,
name=context['name'],
description=context['description'],
type=context['type'],
endpoints=context['endpoints'])
return True
except Exception:
return False