Skip to content

Commit 3187f2e

Browse files
olehermanseclaude
andcommitted
tests: Renamed and expanded block type test
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
1 parent 31bffaa commit 3187f2e

6 files changed

Lines changed: 33 additions & 16 deletions

File tree

tests/lint/004_block_type.cf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bundle common my_bundle
2+
{
3+
vars:
4+
"x" string => "value";
5+
}
6+
7+
promise agent my_promise_type
8+
{
9+
path => "/bin/true";
10+
interpreter => "/bin/bash";
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
bundle notavalidtype my_bundle
3+
^-----------^
4+
Error: Bundle type must be one of (agent, common, edit_line, edit_xml, monitor, server), not 'notavalidtype' at tests/lint/004_block_type.x.cf:1:8
5+
6+
7+
promise server my_promise_type
8+
^----^
9+
Error: Promise type must be 'agent', not 'server' at tests/lint/004_block_type.x.cf:7:9
10+
FAIL: tests/lint/004_block_type.x.cf (2 errors)
11+
Failure, 2 errors in total.

tests/lint/004_block_type.x.cf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bundle notavalidtype my_bundle
2+
{
3+
reports:
4+
"Hello";
5+
}
6+
7+
promise server my_promise_type
8+
{
9+
path => "/bin/true";
10+
interpreter => "/bin/bash";
11+
}

tests/lint/004_bundle_type.cf

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

tests/lint/004_bundle_type.expected.txt

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

tests/lint/004_bundle_type.x.cf

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

0 commit comments

Comments
 (0)