Skip to content

Commit

Permalink
Add tests and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRSP committed Sep 2, 2022
1 parent 11590e1 commit e90b1c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Release Notes
=============
## 1.7.8
* VMs: Default to no priority

## 1.7.7
* NAT Gateways: Initial support for NAT Gateways.
Expand Down
15 changes: 15 additions & 0 deletions src/Tests/VirtualMachine.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit e90b1c3

Please sign in to comment.