Remove testing bits and fix issue with activerecord breaking change

This commit is contained in:
zinduolis
2024-10-25 15:42:29 +10:00
parent 42dcac8d9c
commit 1b17d3c067
9 changed files with 14 additions and 39 deletions

View File

@@ -1,16 +0,0 @@
name: 'BrowserStack Credentials Check'
on:
pull_request:
branches: [ master ]
jobs:
test-browserstack-creds:
runs-on: ubuntu-latest
steps:
- name: Test BrowserStack credentials
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
run: |
curl -u "${BROWSERSTACK_USERNAME}:${BROWSERSTACK_ACCESS_KEY}" https://api.browserstack.com/automate/plan.json

View File

@@ -5,13 +5,6 @@ on:
branches: [ master ]
jobs:
test-browserstacks-creds:
runs-on: ubuntu-latest
steps:
- name: Test BrowserStack credentials
run: |
curl -u "${{ secrets.BROWSERSTACK_USERNAME }}:${{ secrets.BROWSERSTACK_ACCESS_KEY }}" https://api.browserstack.com/automate/plan.json
approve:
runs-on: ubuntu-latest
@@ -34,10 +27,6 @@ jobs:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: Test BrowserStack credentials
run: |
curl -u "${{ secrets.BROWSERSTACK_USERNAME }}:${{ secrets.BROWSERSTACK_ACCESS_KEY }}" https://api.browserstack.com/automate/plan.json
- name: 'BrowserStack Local Tunnel Setup' # Invokes the setup-local action
uses: browserstack/github-actions/setup-local@master
with:

View File

@@ -21,6 +21,7 @@ gem 'term-ansicolor', :require => 'term/ansicolor'
gem 'rubyzip', '~> 2.3'
gem 'espeak-ruby', '~> 1.1.0' # Text-to-Voice
gem 'rake', '~> 13.2'
gem 'activerecord', '~> 7.0'
gem 'otr-activerecord', '~> 2.2.0'
gem 'sqlite3', '~> 1.4'
gem 'rubocop', '~> 1.66.1', require: false

View File

@@ -1,13 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
activemodel (7.1.4)
activesupport (= 7.1.4)
activerecord (7.1.4)
activemodel (= 7.1.4)
activesupport (= 7.1.4)
activemodel (7.1.4.2)
activesupport (= 7.1.4.2)
activerecord (7.1.4.2)
activemodel (= 7.1.4.2)
activesupport (= 7.1.4.2)
timeout (>= 0.4.0)
activesupport (7.1.4)
activesupport (7.1.4.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -268,6 +268,7 @@ PLATFORMS
x86_64-linux
DEPENDENCIES
activerecord (~> 7.0)
ansi (~> 1.5)
async (~> 1.32)
async-dns (~> 1.3)

View File

@@ -50,7 +50,7 @@ RSpec.describe 'AutoRunEngine Test', run_on_browserstack: true do
OTR::ActiveRecord.establish_connection!
end
context = ActiveRecord::Migration.new.migration_context
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration?
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration?
BeEF::Core::Migration.instance.update_db!

View File

@@ -48,9 +48,9 @@ RSpec.describe 'Browser Details Handler', run_on_browserstack: true do
if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2')
OTR::ActiveRecord.establish_connection!
end
context = ActiveRecord::Migration.new.migration_context
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration?
context = ActiveRecord::Migration.new.migration_context
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration?
BeEF::Core::Migration.instance.update_db!
# Spawn HTTP Server

View File

@@ -40,7 +40,7 @@ RSpec.describe 'BeEF Extension Requester' do
# Migrate if required
context = ActiveRecord::Migration.new.migration_context
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration?
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration?
# Start HTTP hook server
http_hook_server = BeEF::Core::Server.instance

View File

@@ -49,7 +49,7 @@ RSpec.describe 'Browser hooking with Websockets', run_on_browserstack: true do
OTR::ActiveRecord.establish_connection!
end
context = ActiveRecord::Migration.new.migration_context
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration?
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration?
BeEF::Core::Migration.instance.update_db!
# Spawn HTTP Server
print_info 'Starting HTTP Hook Server'

View File

@@ -47,7 +47,7 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do
OTR::ActiveRecord.establish_connection!
end
context = ActiveRecord::Migration.new.migration_context
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate if context.needs_migration?
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration, context.internal_metadata).migrate if context.needs_migration?
BeEF::Core::Migration.instance.update_db!