Closed squall2751 closed 5 years ago
Saltcheck is looking inside the winabc/assesr state for a saltcheck_tests folder. It doesn't find one and therefore lists it as missing.
On Thu, May 30, 2019 at 3:56 AM LIM CHUN YEONG notifications@github.com wrote:
Hi all,
I've run a saltcheck for my script, but it return me 1 Missing Tests and without any information for me to debug what i'm missing or wrong. below is my test script and result.
Can the result give more information, such like which line have problem or other things.
Thanks.
user_list_test: module_and_function: cmd.run args:
- 'C:\Script\Domain_LocalAdminMembers.vbs "{{ grains['nodename'] }}"' kwargs: assertion: assertEqual expected-return: True
get_software_list_test: module_and_function: cmd.run args:
- 'wmic /output:"C:\Script{{ grains['nodename']}}-softwarelist.csv" product get name,version /format:csv' kwargs: assertion: assertEqual expected-return: True
get_dbuserlist_test: module_and_function: cmd.run args:
- 'sqlcmd -S {{ grains['nodename'] }} -E -Q "select name,is_disabled from master.sys.server_principals where type not in ('R', 'C')" -o "C:\Script{{ grains['nodename'] }}-sql.csv" -s ","' kwargs: assertion: assertEqual expected-return: True
get_userlist_file_test: module_and_function: cp.push args:
- 'C:\Script{{ grains['nodename'] }}.csv' kwargs: assertion: assertEqual expected-return: True
get_softwarelist_file_test: module_and_function: cp.push args:
- 'C:\Script{{ grains['nodename'] }}-softwarelist.csv' kwargs: assertion: assertEqual expected-return: True
get_dbuserlist_file_test: module_and_function: cp.push args:
- 'C:\Script{{ grains['nodename'] }}-sql.csv' kwargs: assertion: assertEqual expected-return: True
root@raadmin-Virtual-Machine:/srv/salt# salt 'winabc' saltcheck.run_statetests assesr winabc: |
assesr: ---------- |_ ---------- TEST RESULTS: ---------- Failed: 0 Missing Tests: 1 Passed: 0
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wcannon/salt-check/issues/5?email_source=notifications&email_token=AAG6J7LKVEFYTH57SPSNP7TPX6JD5A5CNFSM4HRBBRT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWVRDMA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG6J7PSQN45FTGRKSWVX2TPX6JD5ANCNFSM4HRBBRTQ .
Thanks for reply, I've saltcheck_tests folder and the .tst test file inside it. I also try folder name saltcheck_test, still the same missing. Are somewhere still need to pay attention?
root@raadmin-Virtual-Machine:/srv/salt/assesr# ls
assesr.sls saltcheck-test
root@raadmin-Virtual-Machine:/srv/salt/assesr# ls saltcheck-test/
assesr.tst
Saltcheck is looking inside the winabc/assesr state for a saltcheck_tests folder. It doesn't find one and therefore lists it as missing. … On Thu, May 30, 2019 at 3:56 AM LIM CHUN YEONG @.> wrote: Hi all, I've run a saltcheck for my script, but it return me 1 Missing Tests and without any information for me to debug what i'm missing or wrong. below is my test script and result. Can the result give more information, such like which line have problem or other things. Thanks. user_list_test: module_and_function: cmd.run args: - 'C:\Script\Domain_LocalAdminMembers.vbs "{{ grains['nodename'] }}"' kwargs: assertion: assertEqual expected-return: True get_software_list_test: module_and_function: cmd.run args: - 'wmic /output:"C:\Script{{ grains['nodename']}}-softwarelist.csv" product get name,version /format:csv' kwargs: assertion: assertEqual expected-return: True get_dbuserlist_test: module_and_function: cmd.run args: - 'sqlcmd -S {{ grains['nodename'] }} -E -Q "select name,is_disabled from master.sys.server_principals where type not in ('R', 'C')" -o "C:\Script{{ grains['nodename'] }}-sql.csv" -s ","' kwargs: assertion: assertEqual expected-return: True get_userlist_file_test: module_and_function: cp.push args: - 'C:\Script{{ grains['nodename'] }}.csv' kwargs: assertion: assertEqual expected-return: True get_softwarelist_file_test: module_and_function: cp.push args: - 'C:\Script{{ grains['nodename'] }}-softwarelist.csv' kwargs: assertion: assertEqual expected-return: True get_dbuserlist_file_test: module_and_function: cp.push args: - 'C:\Script{{ grains['nodename'] }}-sql.csv' kwargs: assertion: assertEqual expected-return: True @.Virtual-Machine:/srv/salt# salt 'winabc' saltcheck.run_statetests assesr winabc: | ---------- assesr: ---------- |_ ---------- TEST RESULTS: ---------- Failed: 0 Missing Tests: 1 Passed: 0 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#5?email_source=notifications&email_token=AAG6J7LKVEFYTH57SPSNP7TPX6JD5A5CNFSM4HRBBRT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GWVRDMA>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG6J7PSQN45FTGRKSWVX2TPX6JD5ANCNFSM4HRBBRTQ .
Ok, i found my problem. Thanks missing the s on the folder name
Hi all,
I've run a saltcheck for my script, but it return me 1 Missing Tests and without any information for me to debug what i'm missing or wrong. below is my test script and result.
Can the result give more information, such like which line have problem or other things.
Thanks.