From d5dd9c2c692f951356f81bcc74847441c7c19eea Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 12 Dec 2018 14:32:22 -0800 Subject: [PATCH] fix iops related tests --- nomad/structs/diff_test.go | 12 ++++++++++++ nomad/structs/funcs_test.go | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/nomad/structs/diff_test.go b/nomad/structs/diff_test.go index 4b18f4a1e..42321a413 100644 --- a/nomad/structs/diff_test.go +++ b/nomad/structs/diff_test.go @@ -3253,6 +3253,12 @@ func TestTaskDiff(t *testing.T) { Old: "100", New: "200", }, + { + Type: DiffTypeNone, + Name: "IOPS", + Old: "0", + New: "0", + }, { Type: DiffTypeNone, Name: "MemoryMB", @@ -3574,6 +3580,12 @@ func TestTaskDiff(t *testing.T) { Old: "100", New: "100", }, + { + Type: DiffTypeNone, + Name: "IOPS", + Old: "0", + New: "0", + }, { Type: DiffTypeNone, Name: "MemoryMB", diff --git a/nomad/structs/funcs_test.go b/nomad/structs/funcs_test.go index d29c8e178..486440e63 100644 --- a/nomad/structs/funcs_test.go +++ b/nomad/structs/funcs_test.go @@ -210,6 +210,18 @@ func TestAllocsFit_TerminalAlloc_Old(t *testing.T) { CPU: 2000, MemoryMB: 2048, DiskMB: 10000, + Networks: []*NetworkResource{ + { + Device: "eth0", + CIDR: "10.0.0.0/8", + MBits: 100, + }, + }, + }, + Reserved: &Resources{ + CPU: 1000, + MemoryMB: 1024, + DiskMB: 5000, Networks: []*NetworkResource{ { Device: "eth0",