Skip to content

Commit

Permalink
perf: alert user that ci_user was not set but skip in testing
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <rjdbcm@outlook.com>
  • Loading branch information
rjdbcm committed Nov 19, 2024
1 parent ca1f9fc commit 376c6cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ozi_core/_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class CompressedRotatingFileHandler(logging.handlers.RotatingFileHandler):
def doRollover(self: CompressedRotatingFileHandler) -> None:
def doRollover(self: CompressedRotatingFileHandler) -> None: # pragma: no cover
super().doRollover()
with gzip.open(f'{self.baseFilename}.gz', 'wb') as f:
f.write(Path(self.baseFilename).read_bytes())
Expand Down
4 changes: 3 additions & 1 deletion ozi_core/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import configparser
from pathlib import Path
import sys
from typing import TYPE_CHECKING
from typing import AnyStr
from typing import Literal
Expand Down Expand Up @@ -234,7 +235,8 @@ def render_ci_files_set_user(env: Environment, target: Path, ci_provider: str) -
except (InvalidGitRepositoryError, configparser.NoSectionError) as e: # pragma: no cover
ci_user = ''
logger.debug(str(e))
TAP.not_ok('ci_user was not set')
if 'pytest' not in sys.modules:
TAP.not_ok('ci_user was not set', skip=True)

match ci_provider:
case 'github':
Expand Down

0 comments on commit 376c6cf

Please sign in to comment.