Skip to content

Fix: unique ruleid-testid displayed for unit tests #32

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

Merged
merged 1 commit into from
May 7, 2025
Merged
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
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -791,16 +791,16 @@ logtype:
$ ./go-ftw run --config .ftw.apache-mrts.yaml -d generated/tests/regression/tests/
πŸ› οΈ Starting tests!
πŸš€ Running go-ftw!
πŸ‘‰ executing tests in file MRTS_002_ARGS.yaml
running 2-1: βœ” passed in 12.842548ms (RTT 54.970028ms)
running 2-2: βœ” passed in 12.049459ms (RTT 54.891019ms)
running 2-3: βœ” passed in 10.790834ms (RTT 53.365412ms)
running 2-4: βœ” passed in 10.695786ms (RTT 53.515826ms)
πŸ‘‰ executing tests in file MRTS_002_ARGS.yaml
running 2-1: βœ” passed in 8.615306ms (RTT 52.334647ms)
running 2-2: βœ” passed in 7.64326ms (RTT 52.301444ms)
running 2-3: βœ” passed in 8.353395ms (RTT 52.289161ms)
running 2-4: βœ” passed in 8.704224ms (RTT 52.993254ms)
πŸ‘‰ executing tests in file MRTS_002_ARGS_A-GET.yaml
running 100000-1: βœ” passed in 4.03606ms (RTT 51.456201ms)
running 100000-2: βœ” passed in 2.100709ms (RTT 50.672271ms)
running 100000-3: βœ” passed in 3.572981ms (RTT 51.673479ms)
running 100000-4: βœ” passed in 2.85232ms (RTT 50.599715ms)
πŸ‘‰ executing tests in file MRTS_002_ARGS_A-GET.yaml
running 100001-1: βœ” passed in 2.102875ms (RTT 50.515938ms)
running 100001-2: βœ” passed in 2.188394ms (RTT 50.675838ms)
running 100001-3: βœ” passed in 2.013156ms (RTT 50.583605ms)
running 100001-4: βœ” passed in 1.750534ms (RTT 50.572695ms)
...
```

Expand Down
4 changes: 2 additions & 2 deletions mrts/generate-rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def genrulefromtemplate(self, tpl, current_confdata):
print("No testdata for TARGET")
sys.exit(1)
else:
fname = self.current_confdata['testfile'].replace(".yaml", "") + "_%d.yaml" % (self.currid)
fname = "%d_" % (self.currid) + self.current_confdata['testfile'].replace(".yaml", "") + ".yaml"
self.writetest(fname, self.testcontent)
print("testfile written: %s" % (fname))
self.testcontent = {}
Expand Down Expand Up @@ -534,4 +534,4 @@ def incrementing_substitution(match):
gen = RuleGenerator(flist, args.expdir, args.testdir)


sys.exit(retval)
sys.exit(retval)