-
Notifications
You must be signed in to change notification settings - Fork 175
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
Create reports_definition.py for launching reports from pyTenable #656
Conversation
Tenable SC launch reports using ID in pytenable
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.
Could you provide information on how this was tested? You can refer to existing tests in this directory tests/sc/
.
Hey @aseemsavio , I'm not sure what you're asking me to do with the tests/sc/ folder but that's going to be me not understanding what it is/does. I've tested this locally against an internal version of tenable.sc and it works as intended for launching reportDefinitions, which can then be downloaded with the report endpoint (having returned a report ID). |
Hey @samwmarsh no problem at all! We include tests that confirms the behaviour of a new feature we're adding with the respective pull request. Give me some time, I'll let you know the changes required. |
Co-authored-by: Steven McGrath <[email protected]>
Co-authored-by: Steven McGrath <[email protected]>
Co-authored-by: Steven McGrath <[email protected]>
Co-authored-by: Steven McGrath <[email protected]>
Co-authored-by: Steven McGrath <[email protected]>
Co-authored-by: Steven McGrath <[email protected]>
@aseemsavio all changes merged thanks |
@SteveMcGrath that's all sorted, anything blocking this merge now? |
I'd say there are still some issues just looking at the test suite. https://github.com/tenable/pyTenable/actions/runs/3881092089/jobs/6619727711#step:5:258 |
@SteveMcGrath sorry for the delay on this one, I think I've resolved the test suite issues - seemed to be an issue with typo between file name and imports. |
@SteveMcGrath anything this is waiting on? |
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.
Aside from missing unit tests, looks good.
Apologize for the delay, this one got pushed to the bottom of the stack. if you're willing to write the unit tests, I have no issues getting this approved. |
Not a python dev by any means but hows that? all checks seem happy. |
The two tests you wrote look great, just need a test with a success as well. Not anything crazy, we just need to assert that were getting a valid response. maybe check that the ID exists in the response and it should be ready to merge. |
Something like that? |
I copied this from a different test, is this ok or is there a host value this should be to pass? |
Thanks @SteveMcGrath, apologies I've not got access to .sc from my public github location so it was guesswork based off of the api docs! |
Not a problem, it appeared that the JSON you posted in the cassette wasn't valid, so i tweaked it. |
Tenable SC launch reports using ID in pytenable
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: