-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Containerapp] az containerapp create
: Fix BadRequest Error about clientType with --bind
#7045
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -704,6 +704,51 @@ def test_containerapp_up_dapr_e2e(self, resource_group): | |
|
||
class ContainerappServiceBindingTests(ScenarioTest): | ||
|
||
@AllowLargeResponse(8192) | ||
@ResourceGroupPreparer(location="eastus2") | ||
def test_containerapp_dev_service_binding_none_client_type(self, resource_group): | ||
self.cmd('configure --defaults location={}'.format(TEST_LOCATION)) | ||
ca_name = self.create_random_name(prefix='containerapp1', length=24) | ||
redis_ca_name = 'redis' | ||
postgres_ca_name = 'postgres' | ||
kafka_ca_name = 'kafka' | ||
|
||
env_id = prepare_containerapp_env_for_app_e2e_tests(self) | ||
env_rg = parse_resource_id(env_id).get('resource_group') | ||
env_name = parse_resource_id(env_id).get('name') | ||
|
||
self.cmd('containerapp service redis create -g {} -n {} --environment {}'.format(env_rg, redis_ca_name, env_name), checks=[ | ||
JMESPathCheck('properties.provisioningState', "Succeeded") | ||
]) | ||
|
||
self.cmd('containerapp service postgres create -g {} -n {} --environment {}'.format(env_rg, postgres_ca_name, env_name), checks=[ | ||
JMESPathCheck('properties.provisioningState', "Succeeded") | ||
]) | ||
self.cmd('containerapp service kafka create -g {} -n {} --environment {}'.format(env_rg, kafka_ca_name, env_name), checks=[ | ||
JMESPathCheck('properties.provisioningState', "Succeeded") | ||
]) | ||
|
||
self.cmd( | ||
'containerapp create -n {} -g {} --environment {} --bind {},clientType=dotnet,resourcegroup={} {},clientType=none,resourcegroup={}'.format( | ||
ca_name, resource_group, env_id, redis_ca_name, env_rg, postgres_ca_name, env_rg), expect_failure=False, checks=[ | ||
JMESPathCheck('properties.provisioningState', "Succeeded"), | ||
JMESPathCheck('length(properties.template.serviceBinds)', 2), | ||
JMESPathCheck('properties.template.serviceBinds[0].name', redis_ca_name), | ||
JMESPathCheck('properties.template.serviceBinds[0].clientType', "dotnet"), | ||
JMESPathCheck('properties.template.serviceBinds[1].name', postgres_ca_name), | ||
JMESPathCheck('properties.template.serviceBinds[1].clientType', "none"), | ||
]) | ||
|
||
self.cmd( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please also add test for update related scenario There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added. |
||
'containerapp create -n {} -g {} --environment {} --bind {},resourcegroup={}'.format( | ||
ca_name, resource_group, env_id, kafka_ca_name, env_rg), expect_failure=False, | ||
checks=[ | ||
JMESPathCheck('properties.provisioningState', "Succeeded"), | ||
JMESPathCheck('length(properties.template.serviceBinds)', 1), | ||
JMESPathCheck('properties.template.serviceBinds[0].name', kafka_ca_name), | ||
JMESPathCheck('properties.template.serviceBinds[0].clientType', "none"), | ||
]) | ||
|
||
@AllowLargeResponse(8192) | ||
@ResourceGroupPreparer(location="eastus2") | ||
def test_containerapp_dev_service_binding_customized_keys_yaml_e2e(self, resource_group): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then how can customer clear clilent type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the Cx want to clean the clientType, input
clientType=none
.