Skip to content

Commit 8f386d0

Browse files
Merge pull request #24 from khushishah513/function-tests
fixing errors with invocations and keys tests
2 parents 4677c99 + 7dccb4f commit 8f386d0

2 files changed

Lines changed: 22 additions & 15 deletions

File tree

src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_function_keys.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,7 +2373,7 @@ interactions:
23732373
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
23742374
response:
23752375
body:
2376-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:44:34.5617149Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
2376+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:44:34.5617149Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
23772377
headers:
23782378
api-supported-versions:
23792379
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -2709,7 +2709,7 @@ interactions:
27092709
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
27102710
response:
27112711
body:
2712-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:44:41.2144903Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
2712+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:44:41.2144903Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
27132713
headers:
27142714
api-supported-versions:
27152715
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -3045,7 +3045,7 @@ interactions:
30453045
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
30463046
response:
30473047
body:
3048-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:44:47.9300762Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
3048+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:44:47.9300762Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
30493049
headers:
30503050
api-supported-versions:
30513051
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -3380,7 +3380,7 @@ interactions:
33803380
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
33813381
response:
33823382
body:
3383-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:44:54.2719163Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
3383+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:44:54.2719163Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
33843384
headers:
33853385
api-supported-versions:
33863386
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -3716,7 +3716,7 @@ interactions:
37163716
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
37173717
response:
37183718
body:
3719-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:01.5908585Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
3719+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:01.5908585Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
37203720
headers:
37213721
api-supported-versions:
37223722
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -4052,7 +4052,7 @@ interactions:
40524052
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
40534053
response:
40544054
body:
4055-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:07.5303285Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
4055+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:07.5303285Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
40564056
headers:
40574057
api-supported-versions:
40584058
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -4388,7 +4388,7 @@ interactions:
43884388
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
43894389
response:
43904390
body:
4391-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:13.6270338Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
4391+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:13.6270338Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
43924392
headers:
43934393
api-supported-versions:
43944394
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -4724,7 +4724,7 @@ interactions:
47244724
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
47254725
response:
47264726
body:
4727-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:20.3063481Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
4727+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:20.3063481Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
47284728
headers:
47294729
api-supported-versions:
47304730
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -5060,7 +5060,7 @@ interactions:
50605060
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
50615061
response:
50625062
body:
5063-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:26.0768833Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
5063+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:26.0768833Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
50645064
headers:
50655065
api-supported-versions:
50665066
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -5396,7 +5396,7 @@ interactions:
53965396
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
53975397
response:
53985398
body:
5399-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:33.3084076Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
5399+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:33.3084076Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
54005400
headers:
54015401
api-supported-versions:
54025402
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -5732,7 +5732,7 @@ interactions:
57325732
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
57335733
response:
57345734
body:
5735-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:39.6728182Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
5735+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:39.6728182Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
57365736
headers:
57375737
api-supported-versions:
57385738
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -6068,7 +6068,7 @@ interactions:
60686068
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
60696069
response:
60706070
body:
6071-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:45.5556878Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
6071+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:45.5556878Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
60726072
headers:
60736073
api-supported-versions:
60746074
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -6404,7 +6404,7 @@ interactions:
64046404
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
64056405
response:
64066406
body:
6407-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:52.1483358Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
6407+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:52.1483358Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
64086408
headers:
64096409
api-supported-versions:
64106410
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -6740,7 +6740,7 @@ interactions:
67406740
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
67416741
response:
67426742
body:
6743-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:45:57.9036129Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
6743+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:45:57.9036129Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
67446744
headers:
67456745
api-supported-versions:
67466746
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,
@@ -7076,7 +7076,7 @@ interactions:
70767076
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerApps/functionapp000003/getAuthToken?api-version=2025-02-02-preview
70777077
response:
70787078
body:
7079-
string: '{"location":"East US 2","properties":{"token":***,"expires":"2025-11-12T08:46:03.6345366Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
7079+
string: '{"location":"East US 2","properties":{"token":"***","expires":"2025-11-12T08:46:03.6345366Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.App/containerapps/functionapp000003","name":"functionapp000003","type":"Microsoft.App/containerApps/accesstoken"}'
70807080
headers:
70817081
api-supported-versions:
70827082
- 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview,

src/containerapp/azext_containerapp/tests/latest/test_containerapp_function.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
55

6+
from subprocess import run
7+
from time import sleep
68
import json
79
import os
810
import time
@@ -28,6 +30,11 @@
2830
class ContainerappFunctionTests(ScenarioTest):
2931
def __init__(self, *arg, **kwargs):
3032
super().__init__(*arg, random_config_dir=True, **kwargs)
33+
cmd = ['azdev', 'extension', 'add', 'application-insights']
34+
run(cmd, check=True)
35+
# cmd = ['azdev', 'extension', 'add', 'azure-mgmt-applicationinsights']
36+
# run(cmd, check=True)
37+
sleep(120)
3138

3239

3340
@AllowLargeResponse(8192)

0 commit comments

Comments
 (0)