Skip to content

Commit

Permalink
chore: Updated to content "" in file "features/azure_functions_metada…
Browse files Browse the repository at this point in the history
…... (#1406)

... ta.feature"

Made with ❤️️ by updatecli

Co-authored-by: apmmachine <apmmachine@users.noreply.github.com>
Co-authored-by: Emily S <emily.stolfo@elastic.co>
  • Loading branch information
3 people committed Aug 16, 2023
1 parent 0e778cf commit cd1bc75
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions features/azure_functions_metadata.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Feature: Extracting Metadata for Azure Function Apps

Background:
Given an agent configured with
| setting | value |
| cloud_provider | azure |

Scenario Outline: Azure Function App with minimum set of environment variables present in expected format
Given the following environment variables are present
| name | value |
| FUNCTIONS_EXTENSION_VERSION | version |
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81+faas_group-CentralUSwebspace-Linux |
| WEBSITE_SITE_NAME | site_name |
When cloud metadata is collected
Then cloud metadata is not null
And cloud metadata 'account.id' is 'd2cd53b3-acdc-4964-9563-3f5201556a81'
And cloud metadata 'provider' is 'azure'
And cloud metadata 'service.name' is 'functions'
And cloud metadata 'instance.name' is 'site_name'
And cloud metadata 'project.name' is 'faas_group'
And cloud metadata 'region' is 'CentralUS'

Scenario Outline: Azure Function App with typical set of environment variables present in expected format
Given the following environment variables are present
| name | value |
| FUNCTIONS_EXTENSION_VERSION | version |
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81+faas_group-CentralUSwebspace-Linux |
| WEBSITE_SITE_NAME | site_name |
| REGION_NAME | Central US |
| WEBSITE_RESOURCE_GROUP | faas_group_from_env |
When cloud metadata is collected
Then cloud metadata is not null
And cloud metadata 'account.id' is 'd2cd53b3-acdc-4964-9563-3f5201556a81'
And cloud metadata 'provider' is 'azure'
And cloud metadata 'service.name' is 'functions'
And cloud metadata 'instance.name' is 'site_name'
And cloud metadata 'project.name' is 'faas_group_from_env'
And cloud metadata 'region' is 'Central US'

Scenario: WEBSITE_OWNER_NAME environment variable not expected format
Given the following environment variables are present
| name | value |
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81-faas_group-CentralUSwebspace-Linux |
| WEBSITE_SITE_NAME | site_name |
When cloud metadata is collected
Then cloud metadata is null

Scenario: Missing FUNCTIONS_EXTENSION_VERSION environment variable
Given the following environment variables are present
| name | value |
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81+faas_group-CentralUSwebspace-Linux |
| WEBSITE_SITE_NAME | site_name |
When cloud metadata is collected
Then cloud metadata is null

Scenario: Missing WEBSITE_OWNER_NAME environment variable
Given the following environment variables are present
| name | value |
| FUNCTIONS_EXTENSION_VERSION | version |
| WEBSITE_SITE_NAME | site_name |
When cloud metadata is collected
Then cloud metadata is null

Scenario: Missing WEBSITE_SITE_NAME environment variable
Given the following environment variables are present
| name | value |
| FUNCTIONS_EXTENSION_VERSION | version |
| WEBSITE_OWNER_NAME | d2cd53b3-acdc-4964-9563-3f5201556a81+faas_group-CentralUSwebspace-Linux |
When cloud metadata is collected
Then cloud metadata is null

0 comments on commit cd1bc75

Please sign in to comment.