Skip to content

Commit

Permalink
Improve acceptance test namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 committed Dec 11, 2024
1 parent a63fa68 commit 0019a00
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 25 deletions.
8 changes: 4 additions & 4 deletions spec/acceptance/command_shell_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
RSpec.describe 'CommandShell' do
include_context 'wait_for_expect'

# Tests to ensure that CMD/Powershell/Linux is consistent across all implementations/operation systems
# Tests to ensure that CMD/Powershell/unix is consistent across all implementations/operation systems
COMMAND_SHELL_PAYLOADS = Acceptance::Session.with_session_name_merged(
{
powershell: Acceptance::Session::POWERSHELL,
cmd: Acceptance::Session::CMD,
linux: Acceptance::Session::LINUX
powershell: Acceptance::Session::CommandShell::PowerShell::TESTS,
cmd: Acceptance::Session::CommandShell::PowerShell::TESTS,
unix: Acceptance::Session::CommandShell::Unix::TESTS,
}
)

Expand Down
10 changes: 5 additions & 5 deletions spec/acceptance/meterpreter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
# Tests to ensure that Meterpreter is consistent across all implementations/operation systems
METERPRETER_PAYLOADS = Acceptance::Session.with_session_name_merged(
{
python: Acceptance::Session::PYTHON_METERPRETER,
php: Acceptance::Session::PHP_METERPRETER,
java: Acceptance::Session::JAVA_METERPRETER,
mettle: Acceptance::Session::METTLE_METERPRETER,
windows_meterpreter: Acceptance::Session::WINDOWS_METERPRETER
python: Acceptance::Session::Meterpreter::Python::TESTS,
php: Acceptance::Session::Meterpreter::Php::TESTS,
java: Acceptance::Session::Meterpreter::Java::TESTS,
mettle: Acceptance::Session::Meterpreter::Mettle::TESTS,
windows_meterpreter: Acceptance::Session::Meterpreter::WindowsMeterpreter::TESTS
}
)

Expand Down
4 changes: 2 additions & 2 deletions spec/support/acceptance/command_shell/cmd.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Acceptance::Session
CMD = {
module Acceptance::Session::CommandShell::Cmd
TESTS = {
payloads: [
{
name: 'windows/x64/shell_reverse_tcp',
Expand Down
4 changes: 2 additions & 2 deletions spec/support/acceptance/command_shell/powershell.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Acceptance::Session
POWERSHELL = {
module Acceptance::Session::CommandShell::PowerShell
TESTS = {
payloads: [
{
name: 'cmd/windows/powershell_reverse_tcp',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Acceptance::Session
LINUX = {
module Acceptance::Session::CommandShell::Unix
TESTS = {
payloads: [
{
name: "cmd/unix/reverse_bash",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Acceptance::Session
JAVA_METERPRETER = {
module Acceptance::Session::Meterpreter::Java
TESTS = {
payloads: [
{
name: "java/meterpreter/reverse_tcp",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Acceptance::Session
METTLE_METERPRETER = {
module Acceptance::Session::Meterpreter::Mettle
TESTS = {
payloads: [
{
name: "linux/x64/meterpreter/reverse_tcp",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Acceptance::Session
PHP_METERPRETER = {
module Acceptance::Session::Meterpreter::Php
TESTS = {
payloads: [
{
name: "php/meterpreter_reverse_tcp",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Acceptance::Session
PYTHON_METERPRETER = {
module Acceptance::Session::Meterpreter::Python
TESTS = {
payloads: [
{
name: "python/meterpreter_reverse_tcp",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Acceptance::Session
WINDOWS_METERPRETER = {
module Acceptance::Session::Meterpreter::WindowsMeterpreter
TESTS = {
payloads: [
{
name: "windows/meterpreter/reverse_tcp",
Expand Down

0 comments on commit 0019a00

Please sign in to comment.