Adding tests for getPendingReasons and startMaintenance.
This commit is contained in:
parent
9c7898a227
commit
b4276e9889
2 changed files with 83 additions and 12 deletions
|
@ -128,7 +128,7 @@ func main() {
|
|||
Name("hello_world_from_gorealis").
|
||||
ExecutorName(aurora.AURORA_EXECUTOR_NAME).
|
||||
ExecutorData(string(payload)).
|
||||
CPU(1).
|
||||
CPU(10000).
|
||||
RAM(64).
|
||||
Disk(100).
|
||||
IsService(true).
|
||||
|
@ -582,6 +582,21 @@ func main() {
|
|||
|
||||
fmt.Print(result.String())
|
||||
|
||||
case "getPendingReasons":
|
||||
fmt.Println("Getting pending reasons")
|
||||
taskQ := &aurora.TaskQuery{
|
||||
Role: &job.JobKey().Role,
|
||||
Environment: &job.JobKey().Environment,
|
||||
JobName: &job.JobKey().Name,
|
||||
}
|
||||
reasons, err := r.GetPendingReason(taskQ)
|
||||
if err != nil {
|
||||
log.Fatalf("error: %+v\n ", err)
|
||||
}
|
||||
|
||||
fmt.Printf("length: %d\n ", len(reasons))
|
||||
fmt.Printf("tasks: %+v\n", reasons)
|
||||
|
||||
case "getJobs":
|
||||
fmt.Println("GetJobs...role: ", role)
|
||||
_, result, err := r.GetJobs(role)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue