ronin-rb / ronin

Ronin is a Free and Open Source Ruby Toolkit for Security Research and Development. Ronin also allows for the rapid development and distribution of code, exploits, payloads, etc, via 3rd-party git repositories.
https://ronin-rb.dev
GNU General Public License v3.0
679 stars 49 forks source link

Increase test coverage #165

Open postmodern opened 1 year ago

postmodern commented 1 year ago

We need more tests for the CLI commands.

cmhobbs commented 4 months ago

@postmodern am i on the right track with ASN here? this really just feels like integration tests against Ronin::Support::Network::ASN at the moment. I think tests for #run, #print_asn_record, #print_asn_records will end up being more like proper unit tests, though.

https://github.com/cmhobbs/ronin/blob/165-asn-tests/spec/cli/commands/asn_spec.rb

Please disregard the absolute garbage state of my repo. I failed an upstream merge and I need to work that out but I pushed forward with testing anyhow.

postmodern commented 4 months ago

@cmhobbs I see what you mean. I definitely think the tests for methods which actually query and print the ASN list file should use stubbing to return a custom truncated list file to speed up the tests. Submit a PR when your ready and we can go through the review process.