Skip to content

Commit b83a1af

Browse files
committed
Delete out dir before test generation
1 parent 5b8454f commit b83a1af

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
- Delete the output dir before generating tests ([#7]).
8+
9+
[#7]: https://github.com/stackabletech/beku.py/pull/7)
10+
711
## [0.0.8] - 2023-07-01
812

913
- Bugfix: apply multiple patches sequentially to a single test

src/beku/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import logging
33
from argparse import ArgumentParser, Namespace
44
from os import path
5+
from shutil import rmtree
56

67
from beku.kuttl import renderer_from_file, expand
78
from .version import __version__
@@ -87,6 +88,7 @@ def main() -> int:
8788
logging.basicConfig(
8889
encoding="utf-8", level=_cli_log_level(cli_args.log_level))
8990
effective_test_suites = renderer_from_file(cli_args.test_definition)
91+
rmtree(path=cli_args.output_dir, ignore_errors=True)
9092
# Compatibility warning: add 'tests' to output_dir
9193
output_dir = path.join(cli_args.output_dir, "tests")
9294
return expand(cli_args.suite, effective_test_suites, cli_args.template_dir, output_dir, cli_args.kuttl_test)

0 commit comments

Comments
 (0)