Skip to content

Commit

Permalink
Remove upgrade test related code
Browse files Browse the repository at this point in the history
These were deleted in 2019 per 6e6e5f7
  • Loading branch information
aramprice committed Oct 12, 2024
1 parent 95de185 commit 54106d7
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/bosh-dev/lib/bosh/dev/sandbox/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class Main
EXTERNAL_CPI_CONFIG = 'cpi.json'
EXTERNAL_CPI_CONFIG_TEMPLATE = File.join(Bosh::Dev::ASSETS_DIR, 'cpi_config.json.erb')

UPGRADE_SPEC_ASSETS_DIR = File.join(Bosh::Dev::REPO_ROOT, 'spec', 'assets', 'upgrade')

attr_reader :name
attr_reader :health_monitor_process
attr_reader :scheduler_process
Expand Down Expand Up @@ -173,10 +171,6 @@ def start

@database.create_db

unless @test_initial_state.nil?
load_db_and_populate_blobstore(@test_initial_state)
end

@config_server_service.start(@with_config_server_trusted_certs) if @config_server_enabled

dir_config = director_config
Expand Down Expand Up @@ -316,7 +310,6 @@ def sandbox_root
def reconfigure(options={})
@user_authentication = options.fetch(:user_authentication, 'local')
@config_server_enabled = options.fetch(:config_server_enabled, false)
@test_initial_state = options.fetch(:test_initial_state, nil)
@with_config_server_trusted_certs = options.fetch(:with_config_server_trusted_certs, true)
@director_fix_stateful_nodes = options.fetch(:director_fix_stateful_nodes, false)
@dns_enabled = options.fetch(:dns_enabled, true)
Expand Down Expand Up @@ -412,25 +405,6 @@ def start_nats

private

def load_db_and_populate_blobstore(test_initial_state)
@database.load_db_initial_state(File.join(UPGRADE_SPEC_ASSETS_DIR, test_initial_state))

if @database.adapter.eql? 'mysql2'
tar_filename = 'blobstore_snapshot_with_mysql.tar.gz'
elsif @database.adapter.eql? 'postgres'
tar_filename = 'blobstore_snapshot_with_postgres.tar.gz'
else
raise 'Pre-loading blobstore supported only for PostgresDB and MySQL'
end

blobstore_snapshot_path = File.join(UPGRADE_SPEC_ASSETS_DIR, test_initial_state, tar_filename)
@logger.info("Pre-filling blobstore '#{blobstore_storage_dir}' with blobs from '#{blobstore_snapshot_path}'")
tar_out = `tar xzvf #{blobstore_snapshot_path} -C #{blobstore_storage_dir} 2>&1`
if $?.exitstatus != 0
raise "Cannot pre-fill blobstore: #{tar_out}"
end
end

def external_cpi_config
{
name: 'test-cpi',
Expand All @@ -454,8 +428,6 @@ def do_reset
FileUtils.rm_rf(blobstore_storage_dir)
FileUtils.mkdir_p(blobstore_storage_dir)

load_db_and_populate_blobstore(@test_initial_state) unless @test_initial_state.nil?

stop_nats if @nats_process.running?
start_nats

Expand Down

0 comments on commit 54106d7

Please sign in to comment.