Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: add a test for bug 6278 #1358

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/bug-6278-1/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%YAML 1.1
---

run-as:
user: totally-not-existing-user
12 changes: 12 additions & 0 deletions tests/bug-6278-1/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
requires:
min-version: 6

pcap: false
exit-code: 1
args:
- --engine-analysis

checks:
- shell:
args: grep -c 'unable to get the user ID' stderr
expect: 1
6 changes: 6 additions & 0 deletions tests/bug-6278-2/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
%YAML 1.1
---

run-as:
user: # null user
group:
17 changes: 17 additions & 0 deletions tests/bug-6278-2/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
requires:
min-version: 6

pcap: false
exit-code: 1
args:
- --engine-analysis

checks:
- shell:
args: grep -c 'user name cannot be set to an empty value' stderr
expect: 1
version: 7
- shell:
args: grep -c 'unable to get the user ID' stderr
expect: 1
version: 6