-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated test script for better handling of please enter based prompts… #22
Conversation
…, included mech test without healthcheck tho
tests/test_run_service.py
Outdated
# Security/Authentication inputs | ||
"password": lambda p: "password" in p, | ||
"backup_owner": lambda p: "backup owner" in p, | ||
|
||
# API Keys and Keys | ||
"api_key": lambda p: any(x in p for x in [ | ||
"api key", | ||
"api_key", | ||
"apikey", | ||
"tenderly api", | ||
"coingecko api", | ||
"gemini api" | ||
]), | ||
|
||
# Tenderly specific inputs | ||
"tenderly_info": lambda p: any(x in p for x in [ | ||
"tenderly account", | ||
"tenderly project", | ||
"account slug", | ||
"project slug" | ||
]), | ||
|
||
# Twitter related inputs | ||
"twitter_creds": lambda p: any(x in p for x in [ | ||
"twitter username", | ||
"twitter email", | ||
"twitter password" | ||
]), | ||
|
||
# Technical configurations | ||
"rpc": lambda p: any(x in p for x in ["rpc", "eth_newfilter"]), | ||
"address": lambda p: any(x in p for x in ["address", "contract", "safe"]), | ||
|
||
# Content/Description inputs | ||
"persona": lambda p: "persona" in p, | ||
|
||
# Navigation inputs | ||
"choice": lambda p: "choice" in p, | ||
"enter": lambda p: any(x in p for x in ["press enter", "continue"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it appears to me that these agent specific checks are bloating the whole thing too much. If I'm not wrong then they were added to resolve that ENS issue right? If yes, then they are not needed anymore. We can clean up a lot here, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I shall remove this, once PR passes the test
tests/test_run_service.py
Outdated
@@ -561,7 +570,7 @@ def get_config_files(): | |||
logger.info(f"Found config files: {[f.name for f in config_files]}") | |||
|
|||
# TODO: Support the test for memeooorr and mech |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this comment also
pull_request: | ||
branches: | ||
- main | ||
pull_request: # Removed branches restriction to run on all PRs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the comment, I guess you wanted me to read this comment? If that's the case then just comment it like this one in the PR. Because the comment in the code, doesn't make sense to a 3rd person.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -182,6 +182,17 @@ def check_docker_status(logger: logging.Logger, config_path: str) -> bool: | |||
def check_service_health(logger: logging.Logger, config_path: str) -> tuple[bool, dict]: | |||
"""Enhanced service health check with metrics.""" | |||
service_config = get_service_config(config_path) | |||
|
|||
if "mech" in config_path.lower(): | |||
logger.info("Bypassing health check for mech service") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.info("Bypassing health check for mech service") | |
logger.info("Bypassing health check for mech service because it's not supported") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
@@ -595,7 +626,6 @@ def get_base_config() -> dict: | |||
r"Enter your choice": base_config["STAKING_CHOICE"], | |||
r"Please input your backup owner \(leave empty to skip\)\:": base_config["BACKUP_WALLET"], # Escape parentheses | |||
r"Press enter to continue": "\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r"Press enter to continue": "\n", | |
r"Press enter to continue": "\n", | |
r"Please enter .*": lambda output, logger: handle_env_var_prompt(output, logger, config_path) |
why not keep this line here and then remove it from all the agent-specific parts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didnt do it because as its a get_base_config handler, didnt wanted to pass config paths into it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it too
time.sleep(0.5) | ||
# Send input with a small delay | ||
child.write(response + os.linesep) | ||
time.sleep(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can avoid these delay now right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to test it then! removed it
Description
This PR introduces two main improvements to the test framework: