mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 19:05:42 +03:00
Fixed tests
This commit is contained in:
@@ -22,15 +22,15 @@ func assertWriteMeta(t *testing.T, wm *WriteMeta) {
|
||||
func testJob() *Job {
|
||||
task := NewTask("task1", "exec").
|
||||
Require(&Resources{
|
||||
CPU: 100,
|
||||
MemoryMB: 256,
|
||||
DiskMB: 25,
|
||||
IOPS: 10,
|
||||
}).
|
||||
CPU: 100,
|
||||
MemoryMB: 256,
|
||||
DiskMB: 25,
|
||||
IOPS: 10,
|
||||
}).
|
||||
SetLogConfig(&LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
})
|
||||
MaxFiles: 1,
|
||||
MaxFileSizeMB: 2,
|
||||
})
|
||||
|
||||
group := NewTaskGroup("group1", 1).
|
||||
AddTask(task)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package logrotator
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
||||
@@ -85,6 +85,7 @@ job "job1" {
|
||||
driver = "exec"
|
||||
resources = {
|
||||
cpu = 1000
|
||||
disk = 150
|
||||
mem = 512
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ job "job1" {
|
||||
driver = "exec"
|
||||
resources = {
|
||||
cpu = 1000
|
||||
disk = 150
|
||||
mem = 512
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ func Job() *structs.Job {
|
||||
Resources: &structs.Resources{
|
||||
CPU: 500,
|
||||
MemoryMB: 256,
|
||||
DiskMB: 100,
|
||||
DiskMB: 150,
|
||||
Networks: []*structs.NetworkResource{
|
||||
&structs.NetworkResource{
|
||||
MBits: 50,
|
||||
|
||||
Reference in New Issue
Block a user