Skip to content

Add -TemplateObject parameter to deployment cmdlets and re-record tests #8604

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

Merged
merged 6 commits into from
Mar 6, 2019

Conversation

cormacpayne
Copy link
Member

@cormacpayne cormacpayne commented Feb 22, 2019

Description

Fix for #2933

Checklist

@cormacpayne cormacpayne changed the base branch from master to release-2019-03-12 March 5, 2019 21:57
}
else
{
deployment.Properties.Template = JObject.Parse(JsonConvert.SerializeObject(parameters.TemplateObject));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know that this is filled in at this point? Do our parameter sets require this to be non-empty if we reach this point?

Copy link
Member Author

@cormacpayne cormacpayne Mar 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markcowl yes, -TemplateFile, -TemplateUri and -TemplateObject are all mutually exclusive parameters, and parameters.TemplateFile only has a value if the user provides a value to either one of the first two parameters, and parameters.TemplateObject only has a value if the user provided a value to -TemplateObject, so neither property should be null when the user jumps into the respective block.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markcowl just added the [ValidateNotNull] attribute to the new -TemplateObject parameter

@@ -81,7 +111,7 @@ function Test-CrossResourceGroupDeploymentFromTemplateFile
$rgname = Get-ResourceGroupName
$rgname2 = Get-ResourceGroupName
$rname = Get-ResourceName
$rglocation = "CentralUSEUAP"
$rglocation = "West US 2"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fix this? If not, can we file an issue to fix this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cormacpayne added comment about fixing these hard-coded locations across ARM tests in the issue that was filed for the other Resources PR: #8678

@markcowl markcowl removed their assignment Mar 6, 2019
@markcowl markcowl merged commit 8a5fc2d into Azure:release-2019-03-12 Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants