Azure / Azure/arm-ttk

Arm TTK : URIs Should Be Properly Constructed

Open
#777 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
468
Forks
208
PR merge metrics
No merged PRs in 30d

Description

Here, is the variable in use
`"variables" : {

"LogAnaltyicsUri":"[replace(environment().portal, 'https://portal', concat('https://', toLower(parameters('WorkspaceId')), '.ods.opinsights'))]"
}`

While running arm-ttk tests locally, I noticed an error
` [-] URIs Should Be Properly Constructed (17 ms)
Function 'concat' found within 'LogAnaltyicsUri' Line: 95, Column: 6
Function 'concat' found within 'LogAnaltyicsUri' Line: 101, Column: 6
`

But looking into the branch, lots of other users have contributed with the above format itself, I dont know why this fails.
I tried using a different approach,
"LogAnaltyicsUri": "[format('https://%s.ods.opinsights.azure.com', parameters('AzureSentinelWorkspaceId'))]",

This too led to the following error,
`Function 'format' found within 'LogAnaltyicsUri' Line: 95, Column: 6`

I am creating this as an issue based on my initial question over here https://learn.microsoft.com/en-us/answers/questions/1660160/arm-ttk-validation-help?comment=question#newest-question-comment

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with the ARM-TTK test named “URIs Should Be Properly Constructed,” using the LogAnaltyicsUri expressions shown in the issue. Read the validation rule and compare its handling of concat and format. Done means the expected valid ARM URI construction is established and the test behavior is corrected or clearly documented with coverage for the case.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
cloud, devtools, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.