Skip to content

Commit 04f636d

Browse files
apmmachineapmmachine
andauthored
test: synchronizing gherkin specs (#1723)
Co-authored-by: apmmachine <[email protected]>
1 parent 527f62c commit 04f636d

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
Feature: Extracting Metadata for Azure Function Apps
2+
3+
Background:
4+
Given an agent configured with
5+
| setting | value |
6+
| cloud_provider | azure |
7+
8+
Scenario Outline: Azure Function App with minimum set of environment variables present in expected format
9+
Given the following environment variables are present
10+
| name | value |
11+
| FUNCTIONS_EXTENSION_VERSION | version |
12+
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81+faas_group-CentralUSwebspace-Linux |
13+
| WEBSITE_SITE_NAME | site_name |
14+
When cloud metadata is collected
15+
Then cloud metadata is not null
16+
And cloud metadata 'account.id' is 'd2cd53b3-acdc-4964-9563-3f5201556a81'
17+
And cloud metadata 'provider' is 'azure'
18+
And cloud metadata 'service.name' is 'functions'
19+
And cloud metadata 'instance.name' is 'site_name'
20+
And cloud metadata 'project.name' is 'faas_group'
21+
And cloud metadata 'region' is 'CentralUS'
22+
23+
Scenario Outline: Azure Function App with typical set of environment variables present in expected format
24+
Given the following environment variables are present
25+
| name | value |
26+
| FUNCTIONS_EXTENSION_VERSION | version |
27+
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81+faas_group-CentralUSwebspace-Linux |
28+
| WEBSITE_SITE_NAME | site_name |
29+
| REGION_NAME | Central US |
30+
| WEBSITE_RESOURCE_GROUP | faas_group_from_env |
31+
When cloud metadata is collected
32+
Then cloud metadata is not null
33+
And cloud metadata 'account.id' is 'd2cd53b3-acdc-4964-9563-3f5201556a81'
34+
And cloud metadata 'provider' is 'azure'
35+
And cloud metadata 'service.name' is 'functions'
36+
And cloud metadata 'instance.name' is 'site_name'
37+
And cloud metadata 'project.name' is 'faas_group_from_env'
38+
And cloud metadata 'region' is 'Central US'
39+
40+
Scenario: WEBSITE_OWNER_NAME environment variable not expected format
41+
Given the following environment variables are present
42+
| name | value |
43+
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81-faas_group-CentralUSwebspace-Linux |
44+
| WEBSITE_SITE_NAME | site_name |
45+
When cloud metadata is collected
46+
Then cloud metadata is null
47+
48+
Scenario: Missing FUNCTIONS_EXTENSION_VERSION environment variable
49+
Given the following environment variables are present
50+
| name | value |
51+
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81+faas_group-CentralUSwebspace-Linux |
52+
| WEBSITE_SITE_NAME | site_name |
53+
When cloud metadata is collected
54+
Then cloud metadata is null
55+
56+
Scenario: Missing WEBSITE_OWNER_NAME environment variable
57+
Given the following environment variables are present
58+
| name | value |
59+
| FUNCTIONS_EXTENSION_VERSION | version |
60+
| WEBSITE_SITE_NAME | site_name |
61+
When cloud metadata is collected
62+
Then cloud metadata is null
63+
64+
Scenario: Missing WEBSITE_SITE_NAME environment variable
65+
Given the following environment variables are present
66+
| name | value |
67+
| FUNCTIONS_EXTENSION_VERSION | version |
68+
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81+faas_group-CentralUSwebspace-Linux |
69+
When cloud metadata is collected
70+
Then cloud metadata is null

0 commit comments

Comments
 (0)