From 4c0bee1f6494e5545ae05c644ff2d0e62bd7e073 Mon Sep 17 00:00:00 2001 From: sjanusz-r7 Date: Mon, 12 Feb 2024 12:05:46 +0000 Subject: [PATCH] Passing MSSQL tests for initial_connection_info --- .../post/mssql/ui/console/command_dispatcher/core_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/lib/rex/post/mssql/ui/console/command_dispatcher/core_spec.rb b/spec/lib/rex/post/mssql/ui/console/command_dispatcher/core_spec.rb index 99097003f1784..dd8b2b517dfd2 100644 --- a/spec/lib/rex/post/mssql/ui/console/command_dispatcher/core_spec.rb +++ b/spec/lib/rex/post/mssql/ui/console/command_dispatcher/core_spec.rb @@ -15,9 +15,17 @@ console.disable_output = true console end + let(:initial_connection_info) do + { + envs: [ + { type: 1, old: 'old_db', new: 'new_db' } + ] + } + end before(:each) do allow(client).to receive(:sock).and_return(rstream) + allow(client).to receive(:initial_connection_info).and_return(initial_connection_info) allow(rstream).to receive(:peerinfo).and_return(peer_info) allow(session).to receive(:client).and_return(client) allow(session).to receive(:console).and_return(console)