Skip to content

Commit 6b2b899

Browse files
olehermanseclaude
andcommitted
tests: Expanded linting tests for deprecations to cover str attribute in vars
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent 74d4c24 commit 6b2b899

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

tests/lint/002_deprecations.expected.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
^-------^
55
Deprecation: Promise type 'defaults' is deprecated at tests/lint/002_deprecations.x.cf:3:3
66

7+
vars:
8+
"x" str => "value";
9+
^-^
10+
Deprecation: Use 'string' instead of 'str' at tests/lint/002_deprecations.x.cf:6:9
11+
712
"Hello, CFEngine"
813
ifvarclass => "cfengine";
914
^--------^
10-
Deprecation: Use 'if' instead of 'ifvarclass' at tests/lint/002_deprecations.x.cf:7:7
11-
FAIL: tests/lint/002_deprecations.x.cf (2 errors)
12-
Failure, 2 errors in total.
15+
Deprecation: Use 'if' instead of 'ifvarclass' at tests/lint/002_deprecations.x.cf:9:7
16+
FAIL: tests/lint/002_deprecations.x.cf (3 errors)
17+
Failure, 3 errors in total.

tests/lint/002_deprecations.x.cf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ bundle agent main
22
{
33
defaults:
44
"x" string => "value";
5+
vars:
6+
"x" str => "value";
57
reports:
68
"Hello, CFEngine"
79
ifvarclass => "cfengine";

0 commit comments

Comments
 (0)