Skip to content

Commit 3f734a7

Browse files
committed
test: add .gitkeep to empty dir
1 parent debbc21 commit 3f734a7

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

solnlib/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"""Common utilities."""
1818

1919
import datetime
20+
import logging
2021
import os
2122
import signal
2223
import time
@@ -156,6 +157,11 @@ def wrapper(*args, **kwargs):
156157
try:
157158
return func(*args, **kwargs)
158159
except Exception as e:
160+
logging.warning(
161+
"Run function: %s failed: %s.",
162+
func.__name__,
163+
traceback.format_exc(),
164+
) # deprecated
159165
logger.warning(
160166
"Run function: %s failed: %s.",
161167
func.__name__,

tests/integration/conftest.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
import os
22
import sys
3+
import os.path as op
4+
from unittest.mock import MagicMock
35

46
import pytest
57

68
import context
79

10+
cur_dir = op.dirname(op.abspath(__file__))
11+
12+
mock_msp = MagicMock(return_value=op.sep.join([cur_dir, "data/mock_log"]))
13+
mock_bundle_paths = MagicMock()
14+
mock_bundle_paths.make_splunkhome_path = mock_msp
15+
16+
sys.modules["splunk.clilib.bundle_paths"] = mock_bundle_paths
17+
818

919
@pytest.fixture(autouse=True, scope="session")
1020
def setup_env():

tests/integration/data/mock_log/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)