-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[App Service] az functionapp create: Add DAPR support for Centauri apps
#27589
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
Changes from all commits
bf033a8
4f83e28
e8a3ef1
06f5efb
3087a97
d2cb729
84836c8
d1ee622
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -508,6 +508,59 @@ def test_functionapp_consumption_linux_powershell(self, resource_group, storage_ | |
| self.cmd('functionapp config show -g {} -n {}'.format(resource_group, functionapp_name), checks=[ | ||
| JMESPathCheck('linuxFxVersion', 'PowerShell|7.2')]) | ||
|
|
||
|
|
||
| class FunctionappDapr(LiveScenarioTest): | ||
| @AllowLargeResponse(8192) | ||
| @ResourceGroupPreparer(location="northeurope") | ||
| @StorageAccountPreparer() | ||
| def test_functionapp_dapr_config_e2e(self, resource_group, storage_account): | ||
| functionapp_name = self.create_random_name( | ||
| 'functionappdapr', 24) | ||
| managed_environment_name = self.create_random_name( | ||
| 'managedenvironment', 40 | ||
| ) | ||
|
|
||
| self.cmd('containerapp env create --name {} --resource-group {} --location {} --logs-destination none'.format( | ||
| managed_environment_name, | ||
| resource_group, | ||
| "northeurope" | ||
| )) | ||
|
|
||
| self.cmd('functionapp create -g {} -n {} -s {} --environment {} --dapr-app-id daprappid --dapr-app-port 800 --dhmrs 4 --dhrbs 50 --dapr-log-level debug --enable-dapr true --functions-version 4'.format( | ||
| resource_group, | ||
| functionapp_name, | ||
| storage_account, | ||
| managed_environment_name | ||
| )).assert_with_checks([ | ||
| JMESPathCheck('daprConfig.enabled', True), | ||
| JMESPathCheck('daprConfig.appId', 'daprappid'), | ||
| JMESPathCheck('daprConfig.appPort', 800), | ||
| JMESPathCheck('daprConfig.httpReadBufferSize', 50), | ||
| JMESPathCheck('daprConfig.httpMaxRequestSize', 4), | ||
| JMESPathCheck('daprConfig.logLevel', 'debug'), | ||
| JMESPathCheck('daprConfig.enableApiLogging', False) | ||
| ]) | ||
|
|
||
| time.sleep(1200) | ||
|
|
||
| self.cmd('functionapp config container set -g {} -n {} --dapr-app-id daprappid1 --dapr-app-port 80 --dal --dhmrs 6 --dhrbs 60 --dapr-log-level warn --enable-dapr false'.format( | ||
| resource_group, | ||
| functionapp_name | ||
| )) | ||
|
|
||
| time.sleep(1200) | ||
|
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. is this 1200 just be on safer side that the functionapp config command will be finished by then?
Contributor
Author
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. Yes, otherwise, we get a 409 error since the previous operation is not done |
||
|
|
||
| self.cmd('functionapp show -g {} -n {}'.format(resource_group, functionapp_name)).assert_with_checks([ | ||
| JMESPathCheck('daprConfig.enabled', False), | ||
| JMESPathCheck('daprConfig.appId', 'daprappid1'), | ||
| JMESPathCheck('daprConfig.appPort', 80), | ||
| JMESPathCheck('daprConfig.httpReadBufferSize', 60), | ||
| JMESPathCheck('daprConfig.httpMaxRequestSize', 6), | ||
| JMESPathCheck('daprConfig.logLevel', 'warn'), | ||
| JMESPathCheck('daprConfig.enableApiLogging', True) | ||
| ]) | ||
|
|
||
|
|
||
| class FunctionAppManagedEnvironment(LiveScenarioTest): | ||
| @ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_FUNCTIONAPP) | ||
| @StorageAccountPreparer() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Note: had to keep this test in live mode because it would fail otherwise as it would somehow not find 'operationresults' polling matches in the recording but would always succeed in live mode.
Uh oh!
There was an error while loading. Please reload this page.
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.