Skip to content

Commit 4615775

Browse files
committed
Added tests for communication email, domain and senderusername
1 parent 6b370d9 commit 4615775

File tree

87 files changed

+10415
-4682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+10415
-4682
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
12+
from .. import try_manual
13+
14+
15+
# EXAMPLE: /EmailCommunicationService/put/Create or update resource
16+
@try_manual
17+
def step_create(test, rg_2, rg, checks=None):
18+
if checks is None:
19+
checks = []
20+
test.cmd('az communication email create '
21+
'--name "{myEmailCommunicationService}" '
22+
'--location "Global" '
23+
'--data-location "United States" '
24+
'--resource-group "{rg}"',
25+
checks=checks)
26+
test.cmd('az communication email wait --created '
27+
'--name "{myEmailCommunicationService}" '
28+
'--resource-group "{rg}"')
29+
30+
31+
# EXAMPLE: /EmailCommunicationService/get/Get resource
32+
@try_manual
33+
def step_show(test, rg_2, rg, checks=None):
34+
if checks is None:
35+
checks = []
36+
test.cmd('az communication email show '
37+
'--name "{myEmailCommunicationService}" '
38+
'--resource-group "{rg}"',
39+
checks=checks)
40+
41+
42+
# EXAMPLE: /EmailCommunicationService/get/List by resource group
43+
@try_manual
44+
def step_list(test, rg_2, rg, checks=None):
45+
if checks is None:
46+
checks = []
47+
test.cmd('az communication email list '
48+
'--resource-group "{rg}"',
49+
checks=checks)
50+
51+
52+
# EXAMPLE: /EmailCommunicationService/get/List by resource group alternative command
53+
@try_manual
54+
def step_list2(test, rg_2, rg, checks=None):
55+
if checks is None:
56+
checks = []
57+
test.cmd('az communication email list '
58+
'-g "{rg}"',
59+
checks=checks)
60+
61+
62+
# EXAMPLE: /EmailCommunicationService/patch/Update resource
63+
@try_manual
64+
def step_update(test, rg_2, rg, checks=None):
65+
if checks is None:
66+
checks = []
67+
test.cmd('az communication email update '
68+
'--name "{myEmailCommunicationService}" '
69+
'--tags newTag="newVal" '
70+
'--resource-group "{rg}"',
71+
checks=checks)
72+
73+
74+
# EXAMPLE: /EmailCommunicationService/delete/Delete resource
75+
@try_manual
76+
def step_delete(test, rg_2, rg, checks=None):
77+
if checks is None:
78+
checks = []
79+
test.cmd('az communication email delete -y '
80+
'--name "{myEmailCommunicationService}" '
81+
'--resource-group "{rg}"',
82+
checks=checks)
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
12+
from .. import try_manual
13+
14+
15+
# EXAMPLE: /Domain/put/Create or update resource
16+
@try_manual
17+
def step_create(test, rg, ecs, checks=None):
18+
if checks is None:
19+
checks = []
20+
test.cmd('az communication email domain create '
21+
'--domain-name "{myDomain}" '
22+
'--email-service-name "{ecs}" '
23+
'--location "Global" '
24+
'--domain-management "CustomerManaged" '
25+
'--resource-group "{rg}"',
26+
checks=checks)
27+
test.cmd('az communication email domain wait --created '
28+
'--domain-name "{myDomain}" '
29+
'--email-service-name "{ecs}" '
30+
'--resource-group "{rg}"')
31+
32+
33+
# EXAMPLE: /Domain/get/Get resource
34+
@try_manual
35+
def step_show(test, rg, ecs, checks=None):
36+
if checks is None:
37+
checks = []
38+
test.cmd('az communication email domain show '
39+
'--domain-name "{myDomain}" '
40+
'--email-service-name "{ecs}" '
41+
'--resource-group "{rg}"',
42+
checks=checks)
43+
44+
45+
# EXAMPLE: /Domain/get/List by email service resource
46+
@try_manual
47+
def step_list(test, rg, ecs, checks=None):
48+
if checks is None:
49+
checks = []
50+
test.cmd('az communication email domain list '
51+
'--email-service-name "{ecs}" '
52+
'--resource-group "{rg}"',
53+
checks=checks)
54+
55+
56+
# EXAMPLE: /Domain/get/List by email service resource with resource group alternative command
57+
@try_manual
58+
def step_list2(test, rg, ecs, checks=None):
59+
if checks is None:
60+
checks = []
61+
test.cmd('az communication email domain list '
62+
'--email-service-name "{ecs}" '
63+
'-g "{rg}"',
64+
checks=checks)
65+
66+
67+
# EXAMPLE: /Domain/patch/Update resource
68+
@try_manual
69+
def step_update(test, rg, ecs, checks=None):
70+
if checks is None:
71+
checks = []
72+
test.cmd('az communication email domain update '
73+
'--domain-name "{myDomain}" '
74+
'--email-service-name "{ecs}" '
75+
'--tags newTag="newVal" '
76+
'--resource-group "{rg}"',
77+
checks=checks)
78+
79+
80+
# EXAMPLE: /Domain/delete/Delete resource
81+
@try_manual
82+
def step_delete(test, rg, ecs, checks=None):
83+
if checks is None:
84+
checks = []
85+
test.cmd('az communication email domain delete -y '
86+
'--domain-name "{myDomain}" '
87+
'--email-service-name "{ecs}" '
88+
'--resource-group "{rg}"',
89+
checks=checks)
90+
91+
92+
# EXAMPLE: /Domain/post/Initiate Verification
93+
@try_manual
94+
def step_initiate_verification(test, rg, ecs, checks=None):
95+
if checks is None:
96+
checks = []
97+
test.cmd('az communication email domain initiate-verification '
98+
'--domain-name "{myDomain}" '
99+
'--email-service-name "{ecs}" '
100+
'--verification-type "Domain" '
101+
'--resource-group "{rg}"',
102+
checks=checks)
103+
104+
105+
# EXAMPLE: /Domain/post/Cancel Verification
106+
@try_manual
107+
def step_cancel_verification(test, rg, ecs, checks=None):
108+
if checks is None:
109+
checks = []
110+
test.cmd('az communication email domain cancel-verification '
111+
'--domain-name "{myDomain}" '
112+
'--email-service-name "{ecs}" '
113+
'--verification-type "Domain" '
114+
'--resource-group "{rg}"',
115+
checks=checks)
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
12+
from .. import try_manual
13+
14+
15+
# EXAMPLE: /SenderUsername/put/Create or update resource
16+
@try_manual
17+
def step_create(test, rg, ecs, domain, checks=None):
18+
if checks is None:
19+
checks = []
20+
test.cmd('az communication email domain sender-username create '
21+
'--sender-username "{mySenderUsername}" '
22+
'--domain-name "{domain}" '
23+
'--email-service-name "{ecs}" '
24+
'--username "{mySenderUsername}" '
25+
'--resource-group "{rg}"',
26+
checks=checks)
27+
28+
29+
# EXAMPLE: /SenderUsername/get/Get resource
30+
@try_manual
31+
def step_show(test, rg, ecs, domain, checks=None):
32+
if checks is None:
33+
checks = []
34+
test.cmd('az communication email domain sender-username show '
35+
'--sender-username "{mySenderUsername}" '
36+
'--domain-name "{domain}" '
37+
'--email-service-name "{ecs}" '
38+
'--resource-group "{rg}"',
39+
checks=checks)
40+
41+
42+
# EXAMPLE: /SenderUsername/get/List by domain
43+
@try_manual
44+
def step_list(test, rg, ecs, domain, checks=None):
45+
if checks is None:
46+
checks = []
47+
test.cmd('az communication email domain sender-username list '
48+
'--domain-name "{domain}" '
49+
'--email-service-name "{ecs}" '
50+
'--resource-group "{rg}"',
51+
checks=checks)
52+
53+
54+
# EXAMPLE: /SenderUsername/get/List by domain with alternative resource group command
55+
@try_manual
56+
def step_list2(test, rg, ecs, domain, checks=None):
57+
if checks is None:
58+
checks = []
59+
test.cmd('az communication email domain sender-username list '
60+
'--domain-name "{domain}" '
61+
'--email-service-name "{ecs}" '
62+
'-g "{rg}"',
63+
checks=checks)
64+
65+
66+
# EXAMPLE: /SenderUsername/patch/Update resource
67+
@try_manual
68+
def step_update(test, rg, ecs, domain, checks=None):
69+
if checks is None:
70+
checks = []
71+
test.cmd('az communication email domain sender-username update '
72+
'--sender-username "{mySenderUsername}" '
73+
'--domain-name "{domain}" '
74+
'--email-service-name "{ecs}" '
75+
'--display-name "newDisplayname" '
76+
'--resource-group "{rg}"',
77+
checks=checks)
78+
79+
# EXAMPLE: /SenderUsername/delete/Delete resource
80+
@try_manual
81+
def step_delete(test, rg, ecs, domain, checks=None):
82+
if checks is None:
83+
checks = []
84+
test.cmd('az communication email domain sender-username delete -y '
85+
'--sender-username "{mySenderUsername}" '
86+
'--domain-name "{domain}" '
87+
'--email-service-name "{ecs}" '
88+
'--resource-group "{rg}"',
89+
checks=checks)

0 commit comments

Comments
 (0)