Skip to content

Commit

Permalink
Restore deprecated params in .json files. Expect warnings in yml tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemekwitek committed Aug 5, 2020
1 parent 7b18fd6 commit 08aea5a
Show file tree
Hide file tree
Showing 15 changed files with 118 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
"required":false,
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
},
"allow_no_datafeeds":{
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)",
"deprecated":true
},
"format":{
"type":"string",
"description":"a short version of the Accept header, e.g. json, yaml"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
"required":false,
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
},
"allow_no_jobs":{
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
"deprecated":true
},
"bytes":{
"type":"enum",
"description":"The unit in which to display byte values",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
"required":false,
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
},
"allow_no_jobs":{
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
"deprecated":true
},
"force":{
"type":"boolean",
"required":false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
},
"allow_no_datafeeds":{
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)",
"deprecated":true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
},
"allow_no_datafeeds":{
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)",
"deprecated":true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
},
"allow_no_jobs":{
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
"deprecated":true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
},
"allow_no_jobs":{
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
"deprecated":true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
"allow_no_match":{
"type":"boolean",
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)"
},
"allow_no_jobs":{
"type":"boolean",
"description":"Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)",
"deprecated":true
}
},
"body":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
"required":false,
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)"
},
"allow_no_datafeeds":{
"type":"boolean",
"required":false,
"description":"Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)",
"deprecated":true
},
"force":{
"type":"boolean",
"required":false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ setup:

---
"Test get datafeed with expression that does not match and allow_no_match":
- skip:
features:
- "warnings"

- do:
ml.get_datafeeds:
Expand All @@ -63,6 +66,8 @@ setup:
- match: { datafeeds: [] }

- do:
warnings:
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
ml.get_datafeeds:
datafeed_id: "missing-*"
allow_no_datafeeds: true
Expand All @@ -71,6 +76,9 @@ setup:

---
"Test get datafeed with expression that does not match and not allow_no_match":
- skip:
features:
- "warnings"

- do:
catch: missing
Expand All @@ -79,6 +87,8 @@ setup:
allow_no_match: false

- do:
warnings:
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
catch: missing
ml.get_datafeeds:
datafeed_id: "missing-*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ setup:

---
"Test get datafeed stats with expression that does not match and allow_no_match":
- skip:
features:
- "warnings"

- do:
ml.get_datafeed_stats:
Expand All @@ -112,6 +115,8 @@ setup:
- match: { datafeeds: [] }

- do:
warnings:
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
ml.get_datafeed_stats:
datafeed_id: "missing-*"
allow_no_datafeeds: true
Expand All @@ -120,6 +125,9 @@ setup:

---
"Test get datafeed stats with expression that does not match and not allow_no_match":
- skip:
features:
- "warnings"

- do:
catch: missing
Expand All @@ -128,6 +136,8 @@ setup:
allow_no_match: false

- do:
warnings:
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
catch: missing
ml.get_datafeed_stats:
datafeed_id: "missing-*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

---
"Test get jobs with expression that does not match and allow_no_match":
- skip:
features:
- "warnings"

- do:
ml.get_jobs:
Expand All @@ -24,6 +27,8 @@
- match: { jobs: [] }

- do:
warnings:
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
ml.get_jobs:
job_id: "missing-*"
allow_no_jobs: true
Expand All @@ -32,6 +37,9 @@

---
"Test get jobs with expression that does not match and not allow_no_match":
- skip:
features:
- "warnings"

- do:
catch: missing
Expand All @@ -40,6 +48,8 @@
allow_no_match: false

- do:
warnings:
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
catch: missing
ml.get_jobs:
job_id: "missing-*"
Expand Down Expand Up @@ -863,6 +873,9 @@

---
"Test close jobs with expression that does not match and allow_no_match":
- skip:
features:
- "warnings"

- do:
ml.close_job:
Expand All @@ -871,13 +884,18 @@
- match: { closed: true }

- do:
warnings:
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
ml.close_job:
job_id: "missing-*"
allow_no_jobs: true
- match: { closed: true }

---
"Test close jobs with expression that does not match and not allow_no_match":
- skip:
features:
- "warnings"

- do:
catch: missing
Expand All @@ -886,6 +904,8 @@
allow_no_match: false

- do:
warnings:
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
catch: missing
ml.close_job:
job_id: "missing-*"
Expand Down Expand Up @@ -1581,7 +1601,6 @@
- skip:
features:
- "warnings"
- "allowed_warnings"

- do:
catch: missing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ setup:

---
"Test overall buckets given non-matching expression and not allow_no_match":
- skip:
features:
- "warnings"

- do:
catch: missing
Expand All @@ -248,6 +251,8 @@ setup:
allow_no_match: false

- do:
warnings:
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
catch: missing
ml.get_overall_buckets:
job_id: "none-matching-*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ setup:

---
"Test get job stats given pattern and allow_no_match":
- skip:
features:
- "warnings"

- do:
ml.get_job_stats:
Expand All @@ -215,13 +218,18 @@ setup:
- match: { count: 0 }

- do:
warnings:
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
ml.get_job_stats:
job_id: "missing-*"
allow_no_jobs: true
- match: { count: 0 }

---
"Test get job stats given pattern and not allow_no_match":
- skip:
features:
- "warnings"

- do:
catch: missing
Expand All @@ -230,6 +238,8 @@ setup:
allow_no_match: false

- do:
warnings:
- 'Deprecated field [allow_no_jobs] used, expected [allow_no_match] instead'
catch: missing
ml.get_job_stats:
job_id: "missing-*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ setup:

---
"Test stop with expression that does not match and allow_no_match":
- skip:
features:
- "warnings"

- do:
ml.stop_datafeed:
Expand All @@ -249,13 +252,18 @@ setup:
- match: { stopped: true }

- do:
warnings:
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
ml.stop_datafeed:
datafeed_id: "missing-*"
allow_no_datafeeds: true
- match: { stopped: true }

---
"Test stop with expression that does not match and not allow_no_match":
- skip:
features:
- "warnings"

- do:
catch: missing
Expand All @@ -264,6 +272,8 @@ setup:
allow_no_match: false

- do:
warnings:
- 'Deprecated field [allow_no_datafeeds] used, expected [allow_no_match] instead'
catch: missing
ml.stop_datafeed:
datafeed_id: "missing-*"
Expand All @@ -274,7 +284,6 @@ setup:
- skip:
features:
- "warnings"
- "allowed_warnings"

- do:
catch: missing
Expand Down

0 comments on commit 08aea5a

Please sign in to comment.