Closed wacban closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 71.77%. Comparing base (
2d19c2a
) to head (68ee7cf
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I am going on PTO for a week so feel free to take over this PR if it's needed. If not I'll finish it up when I'm back.
this looks good except we would need this change before submitting it:
diff --git a/pytest/tests/mocknet/helpers/neard_runner.py b/pytest/tests/mocknet/helpers/neard_runner.py
index f38eae92a..344de21f4 100644
--- a/pytest/tests/mocknet/helpers/neard_runner.py
+++ b/pytest/tests/mocknet/helpers/neard_runner.py
@@ -895,7 +895,7 @@ class NeardRunner:
out_path = os.path.join(self.neard_logs_dir, self.neard_logs_file_name)
with open(out_path, 'ab') as out:
if self.is_traffic_generator():
- self.get_start_traffic_generator_cmd(batch_interval_millis)
+ cmd = self.get_start_traffic_generator_cmd(batch_interval_millis)
else:
cmd = self.get_start_cmd()
@@ -963,6 +963,8 @@ class NeardRunner:
cmd.append('--config-path')
cmd.append(self.target_near_home_path('mirror-config.json'))
+ return cmd
+
# returns a bool that tells whether we should attempt a restart
def on_neard_died(self):
if self.is_traffic_generator():
I am going on PTO for a week so feel free to take over this PR if it's needed. If not I'll finish it up when I'm back.
Oh i missed this comment yesterday. So yea i just pushed a commit w that diff above and ill submit it
My goal is to figure out how to set the log level in forknet. Please consider this PR only as an RFC for what would be the best approach to solve this problem. I think in the perfect world the initial setup would happen only once e.g. in
new_test
or inreset
. It may also be nice to add a command to adjust the log config but this can always be done withrun-cmd
so it's low pri.I also refactored things a bit, sorry for mixing it with the real change. The real change is moving
configure_log_config
fromstart_neard
tonew_test
, the rest should be a noop.