Skip to content
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

Custom tests #23

Open
lfoppiano opened this issue Nov 11, 2022 · 2 comments
Open

Custom tests #23

lfoppiano opened this issue Nov 11, 2022 · 2 comments

Comments

@lfoppiano
Copy link
Contributor

Hi, I'm trying to use custom tests to check whether a service is running.

I tried by probing the ports but it was not working (probably they are not using tcp), so I tried this:

    mongo:
        cmd: pgrep mongod | grep -c -e '[0-9]\+' | grep "1"

    mysql:
        cmd: pgrep mysqld_safe | grep -q -e '[0-9]\+'

but for both of them I get error 1. Any clue?

@shukriadams
Copy link
Owner

Sorry for the long delay on replying to this, didn't see the ticket.

What does your script return when you run them in an ordinary shell? Also, are you running AWD directly from NodeJS, from Docker, or as a binary?

@lfoppiano
Copy link
Contributor Author

I'm running AWD as Docker (the old version, with the patch in the PR #24), so if you have modified something I could try the new release.

On the ordinary shell, bash, they return 1 or 0.

If I'm not wrong, it return a string by grepping "1" else an int, but the result does not change:

(base) [Luca@falcon ~]$ pgrep mongod | grep -c -e '[0-9]\+' | grep "1"
1

In fact the second script was incorrect it should be -c:

(base) [Luca@falcon ~]$ pgrep mysqld_safe | grep -c -e '[0-9]\+' | grep "1"
1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants