source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/docker/staging_completion_handler_spec.rb | Ruby | apache-2.0 | 203 | main | 13,360 | require 'spec_helper'
require 'cloud_controller/diego/docker/staging_completion_handler'
module VCAP::CloudController
module Diego
module Docker
RSpec.describe StagingCompletionHandler do
let(:logger) { instance_double(Steno::Logger, info: nil, error: nil, warn: nil) }
let(:app) { AppModel.... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/docker/docker_uri_converter_spec.rb | Ruby | apache-2.0 | 203 | main | 4,677 | require 'spec_helper'
require 'cloud_controller/diego/docker/docker_uri_converter'
require 'utils/uri_utils'
module VCAP::CloudController
RSpec.describe DockerURIConverter do
let(:converter) { DockerURIConverter.new }
context('and the docker image url has no host') do
context('and image only') do
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/docker/desired_lrp_builder_spec.rb | Ruby | apache-2.0 | 203 | main | 7,053 | require 'spec_helper'
module VCAP::CloudController
module Diego
module Docker
RSpec.describe DesiredLrpBuilder do
subject(:builder) { DesiredLrpBuilder.new(config, opts) }
let(:opts) do
{
ports: ports,
docker_image: 'user/repo:tag',
execution_me... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/docker/task_action_builder_spec.rb | Ruby | apache-2.0 | 203 | main | 5,541 | require 'spec_helper'
module VCAP::CloudController
module Diego
module Docker
RSpec.describe TaskActionBuilder do
subject(:task_action_builder) { TaskActionBuilder.new(config, task, lifecycle_data) }
let(:config) do
Config.new({
diego: {
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/docker/lifecycle_data_spec.rb | Ruby | apache-2.0 | 203 | main | 2,547 | require 'spec_helper'
require 'cloud_controller/diego/docker/lifecycle_data'
module VCAP::CloudController
module Diego
module Docker
RSpec.describe LifecycleData do
let(:image) { 'docker:///image/something' }
let(:login_server) { 'http://loginServer.com' }
let(:user) { 'user' }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/docker/staging_action_builder_spec.rb | Ruby | apache-2.0 | 203 | main | 5,813 | require 'spec_helper'
module VCAP::CloudController
module Diego
module Docker
RSpec.describe StagingActionBuilder do
subject(:builder) { StagingActionBuilder.new(config, staging_details) }
let(:config) do
Config.new({
diego: {
docke... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/docker/lifecycle_protocol_spec.rb | Ruby | apache-2.0 | 203 | main | 19,437 | require 'spec_helper'
require 'cloud_controller/diego/docker/lifecycle_protocol'
require_relative '../lifecycle_protocol_shared'
module VCAP
module CloudController
module Diego
module Docker
RSpec.describe LifecycleProtocol do
subject(:lifecycle_protocol) { LifecycleProtocol.new }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/app_buildpack_lifecycle_spec.rb | Ruby | apache-2.0 | 203 | main | 4,707 | require 'spec_helper'
require 'cloud_controller/diego/lifecycles/app_buildpack_lifecycle'
require_relative 'app_lifecycle_shared'
module VCAP::CloudController
RSpec.describe AppBuildpackLifecycle do
subject(:lifecycle) { AppBuildpackLifecycle.new(message) }
let(:message) { VCAP::CloudController::AppCreateMes... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/docker_lifecycle_spec.rb | Ruby | apache-2.0 | 203 | main | 532 | require 'spec_helper'
require_relative 'lifecycle_shared'
module VCAP::CloudController
RSpec.describe DockerLifecycle do
subject(:lifecycle) { DockerLifecycle.new(package, staging_message) }
let(:package) do
PackageModel.make(:docker,
docker_image: 'test-image',
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/lifecycle_shared.rb | Ruby | apache-2.0 | 203 | main | 713 | RSpec.shared_examples_for 'a lifecycle' do
let(:build) { VCAP::CloudController::BuildModel.make }
it 'creates a lifecycle data model' do
expect do
subject.create_lifecycle_data_model(build)
end.not_to raise_error
end
it 'provides staging environment variables' do
expect(subject.staging_envir... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/cnb_lifecycle_spec.rb | Ruby | apache-2.0 | 203 | main | 6,357 | require 'spec_helper'
require_relative 'lifecycle_shared'
module VCAP::CloudController
RSpec.describe CNBLifecycle do
let(:app) { AppModel.make(:cnb, name: 'some-app') }
let!(:package) { PackageModel.make(type: PackageModel::BITS_TYPE, app: app) }
let(:staging_message) { BuildCreateMessage.new(lifecycle:... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/buildpack_info_spec.rb | Ruby | apache-2.0 | 203 | main | 2,573 | require 'spec_helper'
require 'cloud_controller/diego/lifecycles/buildpack_info'
module VCAP::CloudController
RSpec.describe BuildpackInfo do
subject(:info) { BuildpackInfo.new(buildpack_name_or_url, buildpack_record) }
let(:buildpack_name_or_url) { buildpack_record.name.upcase }
let(:buildpack_record) ... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/buildpack_lifecycle_data_validator_spec.rb | Ruby | apache-2.0 | 203 | main | 2,835 | require 'spec_helper'
require 'cloud_controller/diego/lifecycles/buildpack_lifecycle_data_validator'
module VCAP::CloudController
RSpec.describe BuildpackLifecycleDataValidator do
subject(:validator) { BuildpackLifecycleDataValidator.new({ stack:, buildpack_infos: }) }
let(:stack) { Stack.make }
let(:bui... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/app_cnb_lifecycle_spec.rb | Ruby | apache-2.0 | 203 | main | 4,460 | require 'spec_helper'
require 'cloud_controller/diego/lifecycles/app_cnb_lifecycle'
require_relative 'app_lifecycle_shared'
module VCAP::CloudController
RSpec.describe AppCNBLifecycle do
subject(:lifecycle) { AppCNBLifecycle.new(message) }
let(:message) { VCAP::CloudController::AppCreateMessage.new(request) ... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/lifecycle_provider_spec.rb | Ruby | apache-2.0 | 203 | main | 1,900 | require 'spec_helper'
module VCAP::CloudController
RSpec.describe LifecycleProvider do
let(:package) { PackageModel.make }
let(:message) { BuildCreateMessage.new(request) }
context 'when lifecycle type is requested on the message' do
let(:request) { { lifecycle: { type: type, data: {} } } }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/app_lifecycle_provider_spec.rb | Ruby | apache-2.0 | 203 | main | 3,283 | require 'spec_helper'
module VCAP::CloudController
RSpec.describe AppLifecycleProvider do
describe '#provide_for_create' do
let(:message) { AppCreateMessage.new(request) }
context 'when lifecycle type is requested on the message' do
let(:request) { { lifecycle: { type: type, data: {} } } }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/buildpack_lifecycle_spec.rb | Ruby | apache-2.0 | 203 | main | 7,069 | require 'spec_helper'
require_relative 'lifecycle_shared'
module VCAP::CloudController
RSpec.describe BuildpackLifecycle do
let(:app) { AppModel.create(name: 'some-app', space: Space.make) }
let!(:package) { PackageModel.make(type: PackageModel::BITS_TYPE, app: app) }
let(:staging_message) { BuildCreateM... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/app_lifecycle_shared.rb | Ruby | apache-2.0 | 203 | main | 586 | RSpec.shared_examples_for 'a app lifecycle' do
let(:app) { VCAP::CloudController::AppModel.make }
it 'creates a lifecycle data model' do
expect do
subject.create_lifecycle_data_model(app)
end.not_to raise_error
end
it 'provides validations' do
expect(subject.valid?).to be_in([true, false])
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/lifecycles/app_docker_lifecycle_spec.rb | Ruby | apache-2.0 | 203 | main | 296 | require 'spec_helper'
require 'cloud_controller/diego/lifecycles/app_docker_lifecycle'
require_relative 'app_lifecycle_shared'
module VCAP::CloudController
RSpec.describe AppDockerLifecycle do
subject(:lifecycle) { AppDockerLifecycle.new }
it_behaves_like 'a app lifecycle'
end
end |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/buildpack/staging_action_builder_spec.rb | Ruby | apache-2.0 | 203 | main | 27,601 | require 'spec_helper'
module VCAP::CloudController
module Diego
module Buildpack
RSpec.describe StagingActionBuilder do
subject(:builder) { StagingActionBuilder.new(config, staging_details, lifecycle_data) }
let(:droplet) { DropletModel.make(:buildpack) }
let(:enable_declarative_as... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/buildpack/lifecycle_protocol_spec.rb | Ruby | apache-2.0 | 203 | main | 16,118 | require 'spec_helper'
require 'cloud_controller/blobstore/url_generator'
require 'cloud_controller/diego/buildpack/lifecycle_protocol'
require_relative '../lifecycle_protocol_shared'
module VCAP
module CloudController
module Diego
module Buildpack
RSpec.describe LifecycleProtocol do
subje... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/buildpack/lifecycle_data_spec.rb | Ruby | apache-2.0 | 203 | main | 3,391 | require 'spec_helper'
require 'cloud_controller/diego/buildpack/lifecycle_data'
module VCAP::CloudController
module Diego
module Buildpack
RSpec.describe LifecycleData do
let(:lifecycle_data) do
data = LifecycleData.new
data.app_bits_download_u... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/buildpack/desired_lrp_builder_spec.rb | Ruby | apache-2.0 | 203 | main | 14,374 | require 'spec_helper'
module VCAP::CloudController
module Diego
module Buildpack
RSpec.describe DesiredLrpBuilder do
subject(:builder) { DesiredLrpBuilder.new(config, opts) }
before do
Stack.create(name: 'potato-stack')
Stack.create(name: 'stack-thats-not-in-config')
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/buildpack/staging_completion_handler_spec.rb | Ruby | apache-2.0 | 203 | main | 30,392 | require 'spec_helper'
require 'cloud_controller/diego/buildpack/staging_completion_handler'
module VCAP::CloudController
module Diego
module Buildpack
RSpec.describe StagingCompletionHandler do
let(:logger) { instance_double(Steno::Logger, info: nil, error: nil, warn: nil) }
let(:buildpack)... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/buildpack/task_action_builder_spec.rb | Ruby | apache-2.0 | 203 | main | 11,464 | require 'spec_helper'
module VCAP::CloudController
module Diego
module Buildpack
RSpec.describe TaskActionBuilder do
subject(:builder) { TaskActionBuilder.new(config, task, lifecycle_data, 'vcap', ['app', task.command, ''], 'buildpack') }
let(:enable_declarative_asset_downloads) { false }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/cnb/staging_completion_handler_spec.rb | Ruby | apache-2.0 | 203 | main | 21,683 | require 'spec_helper'
require 'cloud_controller/diego/cnb/staging_completion_handler'
module VCAP::CloudController
module Diego
module CNB
RSpec.describe StagingCompletionHandler do
let(:logger) { instance_double(Steno::Logger, info: nil, error: nil, warn: nil) }
let(:success_response) do
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/cnb/desired_lrp_builder_spec.rb | Ruby | apache-2.0 | 203 | main | 14,693 | require 'spec_helper'
module VCAP::CloudController
module Diego
module CNB
RSpec.describe DesiredLrpBuilder do
subject(:builder) { DesiredLrpBuilder.new(config, opts) }
before do
Stack.create(name: 'potato-stack')
Stack.create(name: 'stack-thats-not-in-config')
e... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/cnb/staging_action_builder_spec.rb | Ruby | apache-2.0 | 203 | main | 17,036 | require 'spec_helper'
require 'cloud_controller/diego/cnb/staging_action_builder'
module VCAP::CloudController
module Diego
module CNB
RSpec.describe StagingActionBuilder do
subject(:builder) { StagingActionBuilder.new(config, staging_details, lifecycle_data) }
let(:droplet) { DropletModel... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/cnb/lifecycle_data_spec.rb | Ruby | apache-2.0 | 203 | main | 4,187 | require 'spec_helper'
require 'cloud_controller/diego/buildpack/lifecycle_data'
module VCAP::CloudController
module Diego
module CNB
RSpec.describe LifecycleData do
let(:lifecycle_data) do
data = LifecycleData.new
data.app_bits_download_uri ... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/cnb/lifecycle_protocol_spec.rb | Ruby | apache-2.0 | 203 | main | 17,091 | require 'spec_helper'
require 'cloud_controller/blobstore/url_generator'
require 'cloud_controller/diego/cnb/lifecycle_protocol'
require_relative '../lifecycle_protocol_shared'
module VCAP
module CloudController
module Diego
module CNB
RSpec.describe LifecycleProtocol do
subject(:lifecycl... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/reporters/instances_reporter_spec.rb | Ruby | apache-2.0 | 203 | main | 26,829 | require 'spec_helper'
module VCAP::CloudController
module Diego
RSpec.describe InstancesReporter do
subject(:instances_reporter) { InstancesReporter.new(bbs_instances_client) }
let(:process) { ProcessModelFactory.make(instances: desired_instances) }
let(:desired_instances) { 1 }
let(:bbs... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/reporters/instances_stats_reporter_spec.rb | Ruby | apache-2.0 | 203 | main | 37,629 | require 'spec_helper'
require 'cloud_controller/diego/reporters/instances_stats_reporter'
module VCAP::CloudController
module Diego
RSpec.describe InstancesStatsReporter do
subject(:instances_reporter) { InstancesStatsReporter.new(bbs_instances_client, log_cache_client) }
let(:app) { AppModel.make }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/protocol/routing_info_spec.rb | Ruby | apache-2.0 | 203 | main | 24,130 | require 'spec_helper'
module VCAP::CloudController
module Diego
class Protocol
RSpec.describe RoutingInfo do
describe 'routing_info' do
subject(:routing_info) { RoutingInfo.new(process) }
let(:ri) { routing_info.routing_info }
let(:org) { Organization.make }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/protocol/container_network_info_spec.rb | Ruby | apache-2.0 | 203 | main | 2,223 | require 'spec_helper'
module VCAP::CloudController
module Diego
class Protocol
RSpec.describe ContainerNetworkInfo do
let(:app) { AppModel.make }
let!(:web_process) { ProcessModel.make(app: app, type: 'web') }
let!(:deploying_web_process) { ProcessModel.make(app: app, type: 'web') }... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/diego/protocol/app_volume_mounts_spec.rb | Ruby | apache-2.0 | 203 | main | 5,256 | require 'spec_helper'
require 'cloud_controller/diego/protocol/app_volume_mounts'
module VCAP::CloudController
module Diego
class Protocol
RSpec.describe AppVolumeMounts do
subject(:mounts) { AppVolumeMounts.new(app) }
let(:app) { AppModel.make }
let(:service_instance) { ServiceIns... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/metrics/request_metrics_spec.rb | Ruby | apache-2.0 | 203 | main | 1,855 | require 'spec_helper'
require 'cloud_controller/metrics/request_metrics'
module VCAP::CloudController::Metrics
RSpec.describe RequestMetrics do
let(:statsd_updater) { double(:statsd_updater) }
let(:prometheus_client) { double(:prometheus_client) }
let(:request_metrics) { RequestMetrics.new(statsd_updater... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/metrics/prometheus_updater_spec.rb | Ruby | apache-2.0 | 203 | main | 12,523 | require 'spec_helper'
require 'cloud_controller/metrics/prometheus_updater'
module VCAP::CloudController::Metrics
RSpec.describe PrometheusUpdater do
let(:updater) { PrometheusUpdater.new(registry: prom_client) }
let(:tmpdir) { Dir.mktmpdir }
let(:prom_client) do
Prometheus::Client.config.data_stor... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/metrics/periodic_updater_spec.rb | Ruby | apache-2.0 | 203 | main | 30,060 | require 'spec_helper'
require 'cloud_controller/metrics/periodic_updater'
module VCAP::CloudController::Metrics
RSpec.describe PeriodicUpdater do
let(:periodic_updater) { PeriodicUpdater.new(start_time, log_counter, logger, statsd_updater, prometheus_updater) }
let(:statsd_updater) { double(:statsd_updater) ... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/metrics/statsd_updater_spec.rb | Ruby | apache-2.0 | 203 | main | 15,383 | require 'spec_helper'
require 'cloud_controller/metrics/statsd_updater'
module VCAP::CloudController::Metrics
RSpec.describe StatsdUpdater do
let(:updater) { StatsdUpdater.new(statsd_client) }
let(:statsd_client) { Statsd.new('localhost', 9999) }
let(:store) { double(:store) }
describe '#update_depl... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/logs/request_logs_spec.rb | Ruby | apache-2.0 | 203 | main | 5,830 | require 'spec_helper'
require 'cloud_controller/logs/request_logs'
module VCAP::CloudController::Logs
RSpec.describe RequestLogs do
let(:request_logs) { RequestLogs.new(logger) }
let(:logger) { double('logger', info: nil, error: nil) }
let(:fake_ip) { 'ip' }
let(:fake_fullpath) { 'fullpath' }
let... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/backends/stagers_spec.rb | Ruby | apache-2.0 | 203 | main | 4,009 | require 'spec_helper'
module VCAP::CloudController
RSpec.describe Stagers do
subject(:stagers) { Stagers.new(config) }
let(:config) { TestConfig.config_instance }
describe '#validate_app' do
let!(:admin_buildpack) { Buildpack.make(name: 'admin-buildpack') }
let(:buildpack_lifecycle_data) { B... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/backends/quota_validating_staging_log_rate_limit_calculator_spec.rb | Ruby | apache-2.0 | 203 | main | 2,400 | require 'spec_helper'
require 'cloud_controller/backends/quota_validating_staging_log_rate_limit_calculator'
module VCAP::CloudController
RSpec.describe QuotaValidatingStagingLogRateLimitCalculator do
let(:calculator) { QuotaValidatingStagingLogRateLimitCalculator.new }
describe '#get_limit' do
let(:s... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/backends/instances_reporters_spec.rb | Ruby | apache-2.0 | 203 | main | 4,795 | require 'spec_helper'
module VCAP::CloudController
RSpec.describe InstancesReporters do
subject(:instances_reporters) { InstancesReporters.new }
let(:bbs_instances_client) { instance_double(Diego::BbsInstancesClient) }
let(:logcache_client) { instance_double(::Logcache::Client) }
let(:log_cache_metr... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/backends/quota_validating_staging_memory_calculator_spec.rb | Ruby | apache-2.0 | 203 | main | 3,235 | require 'spec_helper'
require 'cloud_controller/backends/quota_validating_staging_memory_calculator'
module VCAP::CloudController
RSpec.describe QuotaValidatingStagingMemoryCalculator do
let(:calculator) { QuotaValidatingStagingMemoryCalculator.new }
describe '#get_limit' do
let(:minimum_limit) { 10 }... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/backends/non_quota_validating_staging_memory_calculator_spec.rb | Ruby | apache-2.0 | 203 | main | 1,689 | require 'spec_helper'
require 'cloud_controller/backends/non_quota_validating_staging_memory_calculator'
module VCAP::CloudController
RSpec.describe NonQuotaValidatingStagingMemoryCalculator do
let(:calculator) { NonQuotaValidatingStagingMemoryCalculator.new }
describe '#get_limit' do
let(:minimum_lim... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/backends/staging_environment_builder_spec.rb | Ruby | apache-2.0 | 203 | main | 5,326 | require 'spec_helper'
require 'cloud_controller/backends/staging_environment_builder'
module VCAP::CloudController
RSpec.describe StagingEnvironmentBuilder do
let(:builder) { StagingEnvironmentBuilder.new }
describe '#build' do
let(:app) { AppModel.make(environment_variables: { 'APP_VAR' => 'is here' ... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/backends/runners_spec.rb | Ruby | apache-2.0 | 203 | main | 903 | require 'spec_helper'
module VCAP::CloudController
RSpec.describe Runners do
subject(:runners) { Runners.new(config) }
let(:config) do
Config.new({
staging: {
timeout_in_seconds: 90
}
})
end
describe '#runner_for_proc... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/backends/staging_disk_calculator_spec.rb | Ruby | apache-2.0 | 203 | main | 3,063 | require 'spec_helper'
require 'cloud_controller/backends/staging_disk_calculator'
module VCAP::CloudController
RSpec.describe StagingDiskCalculator do
let(:calculator) { StagingDiskCalculator.new }
describe '#get_limit' do
let(:minimum_limit) { 10 }
let(:maximum_limit) { 200 }
let(:request... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/blob_shared.rb | Ruby | apache-2.0 | 203 | main | 352 | RSpec.shared_examples_for 'a blob' do
it 'returns a public_download_url' do
expect { subject.public_download_url }.not_to raise_error
end
it 'returns a internal_download_url' do
expect { subject.internal_download_url }.not_to raise_error
end
it 'returns attributes' do
expect(subject.attributes('... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/client_shared.rb | Ruby | apache-2.0 | 203 | main | 2,140 | RSpec.shared_examples_for 'a blobstore client' do
let!(:tmpfile) do
Tempfile.open('') do |tmpfile|
tmpfile.write('file content')
tmpfile
end
end
let(:key) { 'blobstore-client-shared-key' }
let(:dest_path) { File.join(Dir.mktmpdir, SecureRandom.uuid) }
after do
tmpfile.unlink
File.... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/fingerprints_collection_spec.rb | Ruby | apache-2.0 | 203 | main | 4,466 | require 'spec_helper'
require 'cloud_controller/blobstore/fingerprints_collection'
module CloudController
module Blobstore
RSpec.describe FingerprintsCollection do
let(:unpresented_fingerprints) do
[
{ 'fn' => 'path/to/file.txt', 'size' => 123, 'sha1' => 'abc' },
{ 'fn' => 'path... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/retryable_client_spec.rb | Ruby | apache-2.0 | 203 | main | 8,930 | require 'spec_helper'
require 'cloud_controller/blobstore/retryable_client'
require 'cloud_controller/blobstore/null_client'
require_relative 'client_shared'
module CloudController
module Blobstore
RSpec.describe RetryableClient do
subject(:client) do
RetryableClient.new(
client: wrapped_... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/client_provider_spec.rb | Ruby | apache-2.0 | 203 | main | 9,187 | require 'spec_helper'
module CloudController
module Blobstore
RSpec.describe ClientProvider do
let(:options) { { blobstore_type: } }
context 'when no type is requested' do
let(:blobstore_type) { nil }
before do
options.merge!(fog_connection: {})
end
it 'pr... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/error_handling_client_spec.rb | Ruby | apache-2.0 | 203 | main | 6,307 | require 'spec_helper'
require_relative 'client_shared'
require 'cloud_controller/blobstore/error_handling_client'
require 'cloud_controller/blobstore/null_client'
module CloudController
module Blobstore
RSpec.describe ErrorHandlingClient do
subject(:client) { ErrorHandlingClient.new(wrapped_client) }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/client_spec.rb | Ruby | apache-2.0 | 203 | main | 332 | require 'spec_helper'
require 'cloud_controller/blobstore/null_client'
require_relative 'client_shared'
module CloudController
module Blobstore
RSpec.describe Client do
subject(:client) { Client.new(NullClient.new) }
let(:deletable_blob) { Blob.new }
it_behaves_like 'a blobstore client'
en... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/null_client_spec.rb | Ruby | apache-2.0 | 203 | main | 337 | require 'spec_helper'
require 'cloud_controller/blobstore/null_client'
require_relative 'client_shared'
module CloudController
module Blobstore
RSpec.describe NullClient do
subject(:client) { NullClient.new }
let(:deletable_blob) { instance_double(Blob) }
it_behaves_like 'a blobstore client'
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/null_blob_spec.rb | Ruby | apache-2.0 | 203 | main | 262 | require 'spec_helper'
require 'cloud_controller/blobstore/null_blob'
require_relative 'blob_shared'
module CloudController
module Blobstore
RSpec.describe NullBlob do
subject(:blob) { NullBlob.new }
it_behaves_like 'a blob'
end
end
end |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/safe_delete_client_spec.rb | Ruby | apache-2.0 | 203 | main | 2,090 | require 'spec_helper'
require 'cloud_controller/blobstore/null_client'
require_relative 'client_shared'
module CloudController
module Blobstore
RSpec.describe SafeDeleteClient do
subject(:client) { SafeDeleteClient.new(wrapped_client, root_dir) }
let(:wrapped_client) { NullClient.new }
let(:roo... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/url_generator_spec.rb | Ruby | apache-2.0 | 203 | main | 5,871 | require 'spec_helper'
module CloudController
module Blobstore
RSpec.describe UrlGenerator do
let(:blobstore_options) do
{
blobstore_host: 'api.example.com',
blobstore_tls_port: 9293,
user: 'username',
password: 'password'
}
end
let(:packa... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/blob_key_generator_spec.rb | Ruby | apache-2.0 | 203 | main | 690 | require 'spec_helper'
module CloudController
module Blobstore
RSpec.describe BlobKeyGenerator do
let(:subject) { BlobKeyGenerator }
describe '#key_from_full_path' do
let(:path) { 'ab/cd/some-guid' }
it 'drops the first two directories and outputs the blobstore key' do
key ... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/retryable_blob_spec.rb | Ruby | apache-2.0 | 203 | main | 4,317 | require 'spec_helper'
require 'cloud_controller/blobstore/retryable_blob'
require 'cloud_controller/blobstore/null_blob'
require_relative 'blob_shared'
module CloudController
module Blobstore
RSpec.describe RetryableBlob do
subject(:blob) do
RetryableBlob.new(
blob: wrapped_blob,
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/local/local_client_spec.rb | Ruby | apache-2.0 | 203 | main | 13,640 | require 'spec_helper'
require_relative '../client_shared'
module CloudController
module Blobstore
RSpec.describe LocalClient do
subject(:client) do
LocalClient.new(
directory_key: directory_key,
base_path: base_path,
root_dir: root_dir,
min_size: min_size,
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/local/local_blob_spec.rb | Ruby | apache-2.0 | 203 | main | 2,302 | require 'spec_helper'
module CloudController
module Blobstore
RSpec.describe LocalBlob do
let(:key) { 'te/st/test-key' }
let(:file_path) { Tempfile.new('local_blob_test').path }
let(:file_content) { 'test content for blob' }
subject(:blob) { LocalBlob.new(key: key, file_path: file_path) ... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/storage_cli/storage_cli_blob_spec.rb | Ruby | apache-2.0 | 203 | main | 3,002 | require 'spec_helper'
require_relative '../blob_shared'
module CloudController
module Blobstore
RSpec.describe StorageCliBlob do
let(:properties) { { 'etag' => 'test-blob-etag', 'last_modified' => '2024-10-01T00:00:00Z', 'content_length' => 1024 } }
let(:signed_url) { 'http://signed.example.com/test-... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/storage_cli/storage_cli_client_spec.rb | Ruby | apache-2.0 | 203 | main | 23,135 | require 'spec_helper'
require 'cloud_controller/blobstore/storage_cli/storage_cli_client'
module CloudController
module Blobstore
RSpec.describe StorageCliClient do
describe 'client init' do
# DEPRECATED: Legacy fog provider tests - remove after migration window
# START LEGACY FOG SUPPORT T... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/url_generator/internal_url_generator_spec.rb | Ruby | apache-2.0 | 203 | main | 6,144 | require 'spec_helper'
require 'cloud_controller/blobstore/url_generator/internal_url_generator'
module CloudController
module Blobstore
RSpec.describe InternalUrlGenerator do
let(:blobstore_host) do
'api.example.com'
end
let(:blobstore_port) do
9292
end
let(:connecti... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/url_generator/upload_url_generator_spec.rb | Ruby | apache-2.0 | 203 | main | 1,788 | require 'spec_helper'
require 'cloud_controller/blobstore/url_generator/upload_url_generator'
module CloudController
module Blobstore
RSpec.describe UploadUrlGenerator do
let(:blobstore_host) do
'api.example.com'
end
let(:external_port) { 9292 }
let(:tls_port) { 9293 }
let(:... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/url_generator/local_url_generator_spec.rb | Ruby | apache-2.0 | 203 | main | 4,781 | require 'spec_helper'
require 'cloud_controller/blobstore/url_generator/local_url_generator'
module CloudController
module Blobstore
RSpec.describe LocalUrlGenerator do
let(:blobstore_host) { 'api.example.com' }
let(:external_port) { 9292 }
let(:tls_port) { 9293 }
let(:connection_options)... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/webdav/dav_blob_spec.rb | Ruby | apache-2.0 | 203 | main | 2,210 | require 'spec_helper'
require_relative '../blob_shared'
module CloudController
module Blobstore
RSpec.describe DavBlob do
subject(:blob) { DavBlob.new(httpmessage: httpmessage, key: 'fo/ob/foobar', signer: signer) }
let(:httpmessage) { instance_double(HTTP::Message, headers: {}) }
let(:key) { '... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/webdav/dav_client_spec.rb | Ruby | apache-2.0 | 203 | main | 41,304 | require 'spec_helper'
require_relative '../client_shared'
module CloudController
module Blobstore
RSpec.describe DavClient do
subject(:client) do
DavClient.new(
directory_key: directory_key,
httpclient: httpclient,
signer: signer,
endpoint: 'http://localhost'... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/webdav/nginx_secure_link_signer_spec.rb | Ruby | apache-2.0 | 203 | main | 5,956 | require 'spec_helper'
require 'cloud_controller/blobstore/webdav/nginx_secure_link_signer'
module CloudController
module Blobstore
RSpec.describe NginxSecureLinkSigner do
subject(:signer) do
NginxSecureLinkSigner.new(
internal_endpoint: internal_endpoint,
internal_path_prefix: i... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/fog/fog_blob_spec.rb | Ruby | apache-2.0 | 203 | main | 3,787 | require 'spec_helper'
require_relative '../blob_shared'
module CloudController
module Blobstore
RSpec.describe FogBlob do
subject(:blob) { FogBlob.new(file, cdn) }
let(:attrs) { { 'a' => 'b', 'c' => 'd' } }
let(:file) { double('file', key: 'abcdef', attributes: attrs, destroy: nil) }
let(... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/fog/cdn_spec.rb | Ruby | apache-2.0 | 203 | main | 2,652 | require 'spec_helper'
require 'cloud_controller/blobstore/fog/cdn'
require 'cloudfront-signer'
module CloudController
module Blobstore
RSpec.describe Cdn do
let(:cdn_host) { 'https://some_distribution.cloudfront.net' }
let(:cdn) { Cdn.make(cdn_host) }
describe '.make' do
it 'returns ni... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blobstore/fog/fog_client_spec.rb | Ruby | apache-2.0 | 203 | main | 34,084 | require 'spec_helper'
require 'webrick'
require_relative '../client_shared'
require 'fog/aws/models/storage/files'
require 'fog/aws/models/storage/directories'
module CloudController
module Blobstore
RSpec.describe FogClient do
let(:content) { 'Some Nonsense' }
let(:sha_of_content) { Digester.new.dig... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/runners/puma_runner_spec.rb | Ruby | apache-2.0 | 203 | main | 7,630 | require 'spec_helper'
module VCAP::CloudController
RSpec.describe PumaRunner do
let(:port) { '8181' }
let(:use_nginx) { true }
let(:socket) { '/path/to/socket' }
let(:num_workers) { 3 }
let(:max_threads) { 4 }
let(:app) { double(:app) }
let(:logger) { double(:logger) }
let(:periodic_u... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blob_sender/default_blob_sender_spec.rb | Ruby | apache-2.0 | 203 | main | 668 | require 'spec_helper'
require 'cloud_controller/blob_sender/default_blob_sender'
module CloudController
module BlobSender
RSpec.describe DefaultLocalBlobSender do
subject(:sender) do
DefaultLocalBlobSender.new
end
let(:controller) { double('controller') }
let(:blob) { double('blo... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/blob_sender/nginx_blob_sender_spec.rb | Ruby | apache-2.0 | 203 | main | 1,298 | require 'spec_helper'
module CloudController
module BlobSender
RSpec.describe NginxLocalBlobSender do
subject(:sender) do
NginxLocalBlobSender.new
end
let(:blob) { instance_double(Blobstore::FogBlob, internal_download_url: 'http://url/to/blob') }
describe '#send_blob' do
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/errands/rotate_database_key_spec.rb | Ruby | apache-2.0 | 203 | main | 16,583 | require 'spec_helper'
module VCAP::CloudController
RSpec.describe RotateDatabaseKey do
describe '#perform' do
context 'rotation' do
# Apps are an example of a single encrypted field
let(:historical_app) { AppModel.make }
let(:historical_app_with_no_environment) { AppModel.make }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/buildpacks/stack_name_extractor_spec.rb | Ruby | apache-2.0 | 203 | main | 2,702 | require 'spec_helper'
module VCAP::CloudController::Buildpacks
RSpec.describe StackNameExtractor do
let(:tmpdir) { Dir.mktmpdir }
let(:zip_path) { File.join(tmpdir, 'file.zip') }
def zip_with_manifest_content(manifest_content)
TestZip.create(zip_path, 1, 1024) do |zipfile|
if manifest_cont... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/app_manifest/manifest_route_spec.rb | Ruby | apache-2.0 | 203 | main | 7,173 | require 'spec_helper'
require 'cloud_controller/app_manifest/manifest_route'
module VCAP::CloudController
RSpec.describe ManifestRoute do
describe 'validating routes' do
describe 'valid route' do
context 'when the route has a path' do
let(:route) { 'path.example.com/path' }
it ... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/app_manifest/byte_converter_spec.rb | Ruby | apache-2.0 | 203 | main | 5,977 | require 'spec_helper'
require 'cloud_controller/app_manifest/byte_converter'
module VCAP::CloudController
RSpec.describe ByteConverter do
subject { ByteConverter.new }
describe '#convert_to_mb' do
context 'when given nil' do
let(:byte_value) { nil }
it 'returns nil' do
expec... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/app_services/process_memory_calculator_spec.rb | Ruby | apache-2.0 | 203 | main | 3,860 | require 'spec_helper'
module VCAP::CloudController
RSpec.describe ProcessMemoryCalculator do
subject { ProcessMemoryCalculator.new(process) }
let(:process_guid) { 'i-do-not-match-the-app-guid' }
let(:app_model) { AppModel.make }
let(:process) { ProcessModel.make(guid: process_guid, app: app_model) }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/app_services/process_log_rate_limit_calculator_spec.rb | Ruby | apache-2.0 | 203 | main | 4,485 | require 'spec_helper'
module VCAP::CloudController
RSpec.describe ProcessLogRateLimitCalculator do
subject { ProcessLogRateLimitCalculator.new(process) }
let(:process_guid) { 'i-do-not-match-the-app-guid' }
let(:app_model) { AppModel.make }
let(:process) { ProcessModel.make(guid: process_guid, app: a... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/security/security_context_configurer_spec.rb | Ruby | apache-2.0 | 203 | main | 8,143 | require 'spec_helper'
require 'cloud_controller/security/security_context_configurer'
module VCAP::CloudController
module Security
RSpec.describe SecurityContextConfigurer do
let(:configurer) { SecurityContextConfigurer.new(token_decoder) }
let(:token_decoder) { double(VCAP::CloudController::UaaToken... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/scheduler_spec.rb | Ruby | apache-2.0 | 203 | main | 6,671 | require 'spec_helper'
require 'cloud_controller/deployment_updater/scheduler'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Scheduler do
let(:update_frequency) { 42 }
before do
TestConfig.context = :deployment_updater
TestConfig.override(
deployment_updater: {
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/updater_spec.rb | Ruby | apache-2.0 | 203 | main | 19,532 | require 'spec_helper'
require 'cloud_controller/deployment_updater/updater'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Updater do
subject(:updater) { DeploymentUpdater::Updater.new(deployment, logger) }
let(:a_day_ago) { Time.now - 1.day }
let(:an_hour_ago) { Time.now - 1.hour }
l... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/dispatcher_spec.rb | Ruby | apache-2.0 | 203 | main | 2,389 | require 'spec_helper'
require 'cloud_controller/deployment_updater/dispatcher'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Dispatcher do
subject(:dispatcher) { DeploymentUpdater::Dispatcher }
let(:scaling_deployment) { DeploymentModel.make(state: DeploymentModel::DEPLOYING_STATE) }
le... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/actions/scale_down_canceled_processes_spec.rb | Ruby | apache-2.0 | 203 | main | 1,697 | require 'spec_helper'
require 'cloud_controller/deployment_updater/actions/scale_down_canceled_processes'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Actions::ScaleDownCanceledProcesses do
subject(:finalize_action) { DeploymentUpdater::Actions::ScaleDownCanceledProcesses.new(deployment) }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/actions/scale_spec.rb | Ruby | apache-2.0 | 203 | main | 26,476 | require 'spec_helper'
require 'cloud_controller/deployment_updater/actions/scale'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Actions::Scale do
subject(:scale_action) { DeploymentUpdater::Actions::Scale.new(deployment, logger, target_total_instance_count) }
let(:target_total_instance_count... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/actions/finalize_spec.rb | Ruby | apache-2.0 | 203 | main | 5,701 | require 'spec_helper'
require 'cloud_controller/deployment_updater/actions/finalize'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Actions::Finalize do
subject(:finalize_action) { DeploymentUpdater::Actions::Finalize.new(deployment) }
let(:app) { AppModel.make(revisions_enabled: true) }
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/actions/cancel_spec.rb | Ruby | apache-2.0 | 203 | main | 7,801 | require 'spec_helper'
require 'cloud_controller/deployment_updater/actions/cancel'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Actions::Cancel do
subject(:cancel_action) { DeploymentUpdater::Actions::Cancel.new(deployment, logger) }
let(:a_day_ago) { Time.now - 1.day }
let(:an_hour_ago... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/actions/up_scaler_spec.rb | Ruby | apache-2.0 | 203 | main | 8,763 | require 'spec_helper'
require 'cloud_controller/deployment_updater/actions/up_scaler'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Actions::UpScaler do
let(:app) { AppModel.make(droplet: droplet, revisions_enabled: true) }
let(:droplet) { DropletModel.make }
let!(:web_process) do
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/actions/scale_down_old_process_spec.rb | Ruby | apache-2.0 | 203 | main | 1,973 | require 'spec_helper'
require 'cloud_controller/deployment_updater/actions/scale_down_old_process'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Actions::ScaleDownOldProcess do
subject(:finalize_action) { DeploymentUpdater::Actions::ScaleDownOldProcess.new(deployment) }
let(:app) { AppModel... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/deployment_updater/actions/down_scaler_spec.rb | Ruby | apache-2.0 | 203 | main | 3,643 | require 'spec_helper'
require 'cloud_controller/deployment_updater/actions/down_scaler'
module VCAP::CloudController
RSpec.describe DeploymentUpdater::Actions::DownScaler do
# subject(:scale_action) { DeploymentUpdater::Actions::DownScaler.new(deployment, logger, target_total_instance_count) }
let(:app) { A... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/routing_api/disabled_routing_api_client_spec.rb | Ruby | apache-2.0 | 203 | main | 891 | require 'spec_helper'
module VCAP::CloudController::RoutingApi
RSpec.describe DisabledClient do
let(:client) { DisabledClient.new }
describe '.enabled?' do
it 'returns false' do
expect(client.enabled?).to be(false)
end
end
describe '.router_groups' do
it 'raises a routing ... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/routing_api/routing_api_client_spec.rb | Ruby | apache-2.0 | 203 | main | 6,470 | require 'spec_helper'
module VCAP::CloudController::RoutingApi
RSpec.describe Client do
let(:uaa_client) { instance_double(VCAP::CloudController::UaaClient, token_info:) }
let(:token_info) { instance_double(CF::UAA::TokenInfo, auth_header: 'bearer my-token') }
let(:routing_api_url) { 'http://routing-api.... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/routing_api/router_group_spec.rb | Ruby | apache-2.0 | 203 | main | 1,895 | require 'spec_helper'
require 'cloud_controller/routing_api/router_group'
module VCAP::CloudController::RoutingApi
RSpec.describe RouterGroup do
context 'reservable ports' do
let(:router_group) do
RouterGroup.new({
'guid' => '896c4de9-7a93-4ae8-4643-0864a694ef51',
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/db_connection/mysql_options_factory_spec.rb | Ruby | apache-2.0 | 203 | main | 2,083 | require 'spec_helper'
require 'cloud_controller/db_connection/mysql_options_factory'
RSpec.describe VCAP::CloudController::DbConnection::MysqlOptionsFactory do
let(:required_options) { { database: { adapter: 'mysql' } } }
describe 'when the Cloud Controller Config specifies MySQL' do
let(:ssl_verify_hostname)... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/db_connection/options_factory_spec.rb | Ruby | apache-2.0 | 203 | main | 5,302 | require 'spec_helper'
require 'cloud_controller/db_connection/options_factory'
require 'cloud_controller/db_connection/mysql_options_factory'
RSpec.describe VCAP::CloudController::DbConnection::OptionsFactory do
let(:adapter) { '' }
let(:required_options) { { database: { adapter: } } }
describe '.build' do
... |
github | cloudfoundry/cloud_controller_ng | https://github.com/cloudfoundry/cloud_controller_ng | spec/unit/lib/cloud_controller/db_connection/postgres_options_factory_spec.rb | Ruby | apache-2.0 | 203 | main | 1,991 | require 'spec_helper'
require 'cloud_controller/db_connection/postgres_options_factory'
RSpec.describe VCAP::CloudController::DbConnection::PostgresOptionsFactory do
let(:required_options) { { database: { adapter: 'postgres' } } }
describe 'when the Cloud Controller Config specifies Postgres' do
let(:ssl_veri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.