Skip to content

Commit

Permalink
test(smoke): fix path to globalConfig (incorrect file was used) (#1156)
Browse files Browse the repository at this point in the history
Use correct `globalConfig` in `test_ucc_generate_with_config_param`
test.

---------

Co-authored-by: Artem Rys <[email protected]>
  • Loading branch information
wmazur-splunk and artemrys authored Nov 12, 2024
1 parent 1b43267 commit 8793cef
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions tests/smoke/test_ucc_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,9 @@ def test_ucc_generate_with_config_param():
Check if globalConfig and app.manifest contains current ucc version
"""

def check_ucc_versions():
def check_ucc_versions(parent_folder):
global_config_path = path.join(
path.dirname(path.realpath(__file__)),
"..",
"..",
"output",
parent_folder,
"Splunk_TA_UCCExample",
"appserver",
"static",
Expand Down Expand Up @@ -95,10 +92,12 @@ def check_ucc_versions():
"package_global_config_everything",
"globalConfig.json",
)
with tempfile.TemporaryDirectory(prefix="ucc") as temp:
build.generate(
source=package_folder, config_path=config_path, output_directory=temp
)

build.generate(source=package_folder, config_path=config_path)

check_ucc_versions()
check_ucc_versions(temp)


def test_ucc_generate_with_everything(caplog):
Expand Down Expand Up @@ -376,7 +375,7 @@ def extract_summary_logs():
if copy_logs:
return_logs.append(record)

if record.message[:22] == message_to_end:
if record.message.startswith(message_to_end):
copy_logs = False

return return_logs
Expand Down

0 comments on commit 8793cef

Please sign in to comment.