Skip to content

Commit e3894bd

Browse files
olehermanseclaude
andcommitted
Tests: Expanded linting test for lowercase name convention
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent 6b2b899 commit e3894bd

6 files changed

Lines changed: 48 additions & 16 deletions

tests/lint/003_bundle_name_lowercase.cf

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/lint/003_bundle_name_lowercase.expected.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/lint/003_bundle_name_lowercase.x.cf

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/lint/003_name_lowercase.cf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
bundle agent my_bundle
2+
{
3+
reports:
4+
"Hello";
5+
}
6+
7+
body perms my_body
8+
{
9+
owners => { "root" };
10+
}
11+
12+
promise agent my_promise_type
13+
{
14+
path => "/bin/true";
15+
interpreter => "/bin/bash";
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
bundle agent MyBundle
3+
^------^
4+
Convention: Bundle name should be lowercase at tests/lint/003_name_lowercase.x.cf:1:14
5+
6+
7+
body perms MyBody
8+
^----^
9+
Convention: Body name should be lowercase at tests/lint/003_name_lowercase.x.cf:7:12
10+
11+
12+
promise agent MyPromiseType
13+
^-----------^
14+
Convention: Promise type should be lowercase at tests/lint/003_name_lowercase.x.cf:12:15
15+
FAIL: tests/lint/003_name_lowercase.x.cf (3 errors)
16+
Failure, 3 errors in total.

tests/lint/003_name_lowercase.x.cf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
bundle agent MyBundle
2+
{
3+
reports:
4+
"Hello";
5+
}
6+
7+
body perms MyBody
8+
{
9+
owners => { "root" };
10+
}
11+
12+
promise agent MyPromiseType
13+
{
14+
path => "/bin/true";
15+
interpreter => "/bin/bash";
16+
}

0 commit comments

Comments
 (0)