Commit Graph

55 Commits

Author SHA1 Message Date
Dean Welch 46273d5f08 Add test run with defer module loads feature enabled 2024-01-16 17:40:55 +00:00
adfoster-r7 1b12dc3940 Update ssh login pubkey module to correctly identify windows ssh platform 2023-11-17 12:51:01 +00:00
adfoster-r7 d71883f55a Fix broken test suite when running in small console window 2023-09-18 16:40:47 +01:00
adfoster-r7 68ce65c6c9 Revert "Revert "Add Meterpreter sanity tests to CI"" 2023-08-15 13:24:59 +01:00
adfoster-r7 cdbd591f07 Revert "Add Meterpreter sanity tests to CI" 2023-08-10 19:08:09 +01:00
adfoster-r7 d8dc189168 Add Meterpreter sanity tests to CI 2023-08-03 17:11:44 +01:00
adfoster-r7 19c79bed18 Before running tests ensure database is migrated 2023-04-15 00:35:09 +01:00
adfoster-r7 3a281234df Add feature flagged datastore rewrite, with support for option fallback lookups 2022-09-16 12:59:02 +01:00
adfoster-r7 756c910b9a Add warning if OPENSSL_CONF is already present 2022-08-05 15:45:50 +01:00
adfoster-r7 f65119b353 Support OpenSSL3 and run Ubuntu 22.04 in test matrix 2022-08-03 15:49:53 +01:00
adfoster-r7 09129f086d Add option to ignore loading metasploit during tests 2022-02-25 12:59:10 +00:00
A Galway fc55d74b80 http-client cookie jar support and tests 2021-04-16 12:24:21 +01:00
Jeffrey Martin 89d010a533 remove rails_bigdecimal_fix with rails 5 bump 2020-07-31 11:56:50 -05:00
Alan Foster 4604488c05 Update rubocop version 2020-07-07 19:19:37 +01:00
Alan Foster 2509bbfbc3 Remove rspec test focus, and ensure all tests run 2020-07-07 17:29:50 +01:00
Alan Foster bfd284b349 Add initial layout cops for the module super hash 2020-03-06 10:41:41 +00:00
Brent Cook e4992c6817 move bigdecimal fix to separate file, include for specs
This fixes some noisy warnings about bignum when running specs, making it easier to see the real problems.
2019-09-10 18:40:14 -05:00
Brent Cook 40d11b2fdd explicitly require factory_bot, see #12181 2019-08-20 06:54:34 -05:00
Matthew Kienow 5e28bccda9 Move msfdb_ws since it is deprecated by msfdb 2019-01-09 23:40:02 -05:00
christopher lee e97693d056 Cleanup 2018-04-26 16:01:15 -05:00
christopher lee 3aed6d6666 Initial 2018-04-02 08:08:23 -05:00
Jeffrey Martin cd114c90e0 remove no longer available bundler hack
This address issue #9155 for bundler failures in TravisCI
2017-11-01 11:52:41 -05:00
Brent Cook e1db3ef369 Land #6388, Update msftidy to error when module super class is incorrect 2016-03-06 16:53:11 -06:00
Christian Mehlmauer 478cd2ed5c check database.yml path 2016-01-21 20:32:32 +01:00
Christian Mehlmauer f68b2b56fa use hardcoded path 2016-01-19 23:51:28 +01:00
Christian Mehlmauer aaa1174ca5 fix rspec errors without database 2016-01-19 20:28:58 +01:00
David Maloney 06a75e1339 re-enable deprecation errors
had to disable this to let transpec do
dynamic analysis. re-enabling now to throw
an error on any deprecation warning
2015-12-31 16:57:17 -06:00
David Maloney 0a8cc8e01c basic transpec conversions
no options apssed, first run of transpec
not much to report
2015-12-31 16:43:26 -06:00
Jon Hart f029cd0c9a Add common helpers for capturing stdout/stderr 2015-12-24 10:54:51 -08:00
Luke Imhoff ed1e984b6a Update spec_helper with all rspec 3 features
MSP-13484

Copied from metasploit-cache.
2015-12-10 21:47:22 -06:00
Luke Imhoff 633b4b9e51 Disable simplecov on travis-ci
MSP-11671

`bundler install --without coverage` will not install `simplecov`.
Running without simplecov changes the average runtime of `rake
cucumber:boot` from (n=13) 112.50 seconds to (n=10) 32.17 seconds
(-71.41%). (-73.68% from 2c1203ba49d49603aec169eed053ab929ccdedc6.)  Raw
data:
https://docs.google.com/spreadsheets/d/1vCRi_38Go3Wfq670eDCXMTSSXL1blSbk6NQsgpOqfYw/edit?usp=sharing.
2014-12-05 11:58:09 -06:00
Luke Imhoff d4d710cc3a Merge branch 'feature/MSP-11130/metasploit-framework-spec-constants' into feature/MSP-11147/thread-leak-detection
MSP-11147

Merge to get framework instance cleanup, which should clean up a lot of
thread leaks too.

Conflicts:
	Rakefile
	lib/metasploit/framework/spec.rb
	spec/spec_helper.rb
2014-11-05 15:47:59 -06:00
Luke Imhoff 96990fdc02 Fail before suite if more than 1 thread exists
MSP-11147

Detect thread leaks in a `before(:suite)` configured by
`Metasploit::Framework::Spec::Threads::Suite.configure!` and fail if any
leaks are found.
2014-11-05 14:38:43 -06:00
Luke Imhoff dee02fc85b Automatically clear previous log/metasploit/framework/spec/constants/each.log
MSP-11130

Have a task, 'metasploit:framework:spec:constants:each:clean' run before
`rake spec` that removes the previous
`log/metasploit/framework/spec/constants/each.log` so that the user doesn't
have to manually remove the load when removing
`Metasploit::Framework::Spec::Constants::Each.configure!` from
`spec/spec_helper.rb`.
2014-11-04 13:58:13 -06:00
Luke Imhoff 313d86982c Log Spec::Constants::Each error instead of flag.
MSP-11130

Instead of writing `1` to the file and then printing a verbose message
in the spec task action, log the verbose message and just print the log
in the spec task action, so other tools can just look at the log when
not using `rake spec`.

NOTE: Failing specs due to unnecessary
`Metasploit::Framework::Spec::Constants::Each.configure!`
2014-11-04 13:36:52 -06:00
Luke Imhoff b0f1b2a1f7 Merge branch 'master' into feature/MSP-11130/metasploit-framework-spec-constants
MSP-11130

Conflicts:
	Rakefile
2014-11-04 10:10:12 -06:00
Luke Imhoff cc4e553c11 Remove Metasploit::Framework::Spec::Constants::Each.configured!
MSP-11130

No longer needed because all before suite leaks have been fixed.
2014-11-04 09:50:16 -06:00
Luke Imhoff 0d4b22ce7a Detect constant leaks in individual examples
MSP-11130

`Metasploit::Framework::Spec::Constants::Each.configure!` will set up an
`after(:each)` callback that will fail the example if there are leaked
constants.  Leaked constants are cleaned up to prevent misattribution.
2014-10-28 15:50:24 -05:00
Luke Imhoff f9b1f2a424 Extract Metasploit::Framework::Spec::Constants::Suite
MSP-11130

`Metasploit::Framework::Spec::Constants::Suite` extracts out
`LOG_PATHNAME`, `configure!`, and `define_task` as those piece are
specific to handling constant leaks for the entire suite.  This is in
preparation for `Metasploit::Framework::Spec::Constants::Each`.
2014-10-28 15:07:32 -05:00
Luke Imhoff 43552a8304 Tag module specs with :content
MSP-11145

Tag content-related specs so they can be run separately in travis-ci.
2014-10-27 14:25:34 -05:00
Luke Imhoff 605f48e58d Detect leaked constants under Msf::Modules
MSP-11130

Detect constants leaked under Msf::Modules after the suite completes.
2014-10-27 11:13:43 -05:00
Joe Vennix 46f256a6bd Adds a spec to ensure HttpServer runs Concern hooks. 2014-09-12 10:52:57 -05:00
jvazquez-r7 f266ca99f5 Use allow_any_instance_of as with rspec 3 2014-09-07 21:18:22 -05:00
Samuel Huckins 149c3ecc63 Various merge resolutions from master <- staging
* --ask option ported to new location
* --version option now works
* MSF version updated
* All specs passing
2014-08-15 11:33:31 -05:00
Tab Assassin 2e8d19edcf Retab all the things (except external/) 2013-09-30 13:47:53 -05:00
David Maloney 22e4db04e0 opening specs and fixes for OptAddressRange 2013-07-18 12:44:48 -05:00
James Lee 0f2ea755c5 Add encoding comment to spec files for 2.0 compat 2013-06-07 13:27:39 -05:00
Brandon Turner e3ab2e9747 Fix specs with bundler groups
Also output warnings when running Rake when the db group isn't included.
2013-04-12 10:46:00 -05:00
Luke Imhoff 0bb79ba890 Msf::DBManager#import_msf_xml refactor
[#46491831]

Move Msf::DBManager#import_msf_xml into
Msf::DBManager::ImportMsfXml#import_msf_xml and include
Msf::DBManager::ImportMsfXml to cut down size of the infamous db.rb.
Break up #import_msf_xml to have separate methods for parsing web_forms,
web_pages, and web_vulns.  The method for
web_vulns, #import_msf_web_vuln_element is needed so that it can be overridden in
Pro to handle the Pro-only changes to Mdm::WebVuln.
2013-04-01 16:06:40 -05:00
Luke Imhoff 2604fad164 Allow use of rake db tasks
[#46224565]

The following rake tasks are added and work similar to how they work in
rails apps:
* db:create
* db:drop
* db:migrate
* db:migrate:status
* db:rollback
* db:schema:dump
* db:schema:load
* db:seed (but no db seeds defined at this time)
* db:setup
* db:version

The hidden task db:test:prepare is also available, which means `rake
spec` can depend on it so that the test database is dropped and
recreated from the development database when running specs (Although
there are yet to be database tests, this branch is in preparation for
that work that will be split between multiple developers.)
2013-03-14 15:46:18 -05:00