From e90b1c330a638154450f7b3392f4fb9ce170caea Mon Sep 17 00:00:00 2001 From: Richard Sanderson-Pope Date: Fri, 2 Sep 2022 14:07:21 +0100 Subject: [PATCH] Add tests and release notes --- RELEASE_NOTES.md | 2 ++ src/Tests/VirtualMachine.fs | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b07cc1d28..07109c86c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,7 @@ Release Notes ============= +## 1.7.8 +* VMs: Default to no priority ## 1.7.7 * NAT Gateways: Initial support for NAT Gateways. diff --git a/src/Tests/VirtualMachine.fs b/src/Tests/VirtualMachine.fs index d76e18a31..61e1835db 100644 --- a/src/Tests/VirtualMachine.fs +++ b/src/Tests/VirtualMachine.fs @@ -57,6 +57,21 @@ let tests = (resource.DiagnosticsProfile.BootDiagnostics.Enabled.GetValueOrDefault false) "Boot Diagnostics should be enabled" } + + test "By default, VM does not include Priority" { + let template = + let myVm = + vm { + name "myvm" + username "me" + } + + arm { add_resource myVm } + + let jobj = Newtonsoft.Json.Linq.JObject.Parse(template.Template |> Writer.toJson) + let vmProperties = jobj.SelectToken("resources[?(@.name=='myvm')].properties") :?> Newtonsoft.Json.Linq.JObject + Expect.isNull (vmProperties.Property "priority") "Priority should not be set by default" + } test "Can create a basic virtual machine with managed boot diagnostics" { let resource = let myVm =