Add basic task loop detection test
Change-Id: I5ed787ec3fb0694858955e5d675b5b7c0a6621df
diff --git a/src/main/resources/Documentation/task_states.md b/src/main/resources/Documentation/task_states.md
index dcd1026..077eb77 100644
--- a/src/main/resources/Documentation/task_states.md
+++ b/src/main/resources/Documentation/task_states.md
@@ -219,6 +219,9 @@
fail = True
in-progress = has:bad
+[task "Looping"]
+ subtask = Looping
+
```
`task/special.config` file in project `All-Users` on ref `refs/users/self`.
@@ -546,6 +549,17 @@
"hasPass" : false,
"name" : "Subtask INVALID",
"status" : "INVALID"
+ },
+ {
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
},
diff --git a/test/all b/test/all
index 7691bc2..eef2be7 100644
--- a/test/all
+++ b/test/all
@@ -392,6 +392,18 @@
"hasPass" : true,
"name" : "NA Bad INPROGRESS query",
"status" : "FAIL"
+ },
+ {
+ "applicable" : true,
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
},
@@ -498,6 +510,18 @@
"hasPass" : true,
"name" : "NA Bad INPROGRESS query",
"status" : "FAIL"
+ },
+ {
+ "applicable" : true,
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
},
diff --git a/test/invalid b/test/invalid
index 2fa594e..528cad0 100644
--- a/test/invalid
+++ b/test/invalid
@@ -137,6 +137,18 @@
"hasPass" : true,
"name" : "NA Bad INPROGRESS query",
"status" : "INVALID"
+ },
+ {
+ "applicable" : true,
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
},
@@ -231,6 +243,18 @@
"hasPass" : true,
"name" : "NA Bad INPROGRESS query",
"status" : "INVALID"
+ },
+ {
+ "applicable" : true,
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
}
diff --git a/test/invalid-applicable b/test/invalid-applicable
index c1c756a..c078c92 100644
--- a/test/invalid-applicable
+++ b/test/invalid-applicable
@@ -86,6 +86,17 @@
"hasPass" : false,
"name" : "Subtask INVALID",
"status" : "INVALID"
+ },
+ {
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
}
diff --git a/test/preview b/test/preview
index a885f11..9394637 100644
--- a/test/preview
+++ b/test/preview
@@ -93,6 +93,18 @@
"hasPass" : true,
"name" : "NA Bad INPROGRESS query",
"status" : "FAIL"
+ },
+ {
+ "applicable" : true,
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
},
@@ -234,6 +246,18 @@
"hasPass" : true,
"name" : "NA Bad INPROGRESS query",
"status" : "FAIL"
+ },
+ {
+ "applicable" : true,
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
}
diff --git a/test/preview.invalid b/test/preview.invalid
index 2ddcb1c..16e0426 100644
--- a/test/preview.invalid
+++ b/test/preview.invalid
@@ -93,6 +93,18 @@
"hasPass" : true,
"name" : "NA Bad INPROGRESS query",
"status" : "INVALID"
+ },
+ {
+ "applicable" : true,
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
},
@@ -187,6 +199,18 @@
"hasPass" : true,
"name" : "NA Bad INPROGRESS query",
"status" : "INVALID"
+ },
+ {
+ "applicable" : true,
+ "hasPass" : false,
+ "name" : "Looping",
+ "status" : "WAITING",
+ "subTasks" : [
+ {
+ "name" : "UNKNOWN",
+ "status" : "INVALID"
+ }
+ ]
}
]
}