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/db/db_session_settings_spec.rb
Ruby
apache-2.0
203
main
461
require 'spec_helper' RSpec.describe 'Db connection sessions' do it 'sets the timezone to UTC' do conn = DbConfig.new.connection type = conn.database_type if type == :postgres timestamp = conn['select current_timestamp'].first.values.first.to_s expect(timestamp).to include('UTC') elsif t...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/db/db_standards_spec.rb
Ruby
apache-2.0
203
main
1,330
require 'spec_helper' RSpec.describe 'DB Schema' do connection = DbConfig.new.connection # The maximum length of names for tables, columns and indices is: # Postgres: 63bytes -> 63 characters due to UTF-8 # Mysql: 64 characters if connection.supports_table_listing? connection.tables.each do |table| ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/allowy/context_spec.rb
Ruby
apache-2.0
203
main
1,142
# frozen_string_literal: true require_relative 'allowy_spec_helper' module Allowy class SampleContext include Context end RSpec.describe Context do subject(:sample_context) { SampleContext.new } let(:access) { double('Access') } it 'creates a registry' do expect(Registry).to receive(:ne...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/allowy/allowy_spec_helper.rb
Ruby
apache-2.0
203
main
581
# frozen_string_literal: true # Lightweight spec helper for allowy tests # Does not require database connection or full CCNG stack require 'rspec' require 'allowy/allowy' # Test fixtures class SampleAccess include Allowy::AccessControl def read?(str) str == 'allow' end def early_deny?(str) deny!("e...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/allowy/registry_spec.rb
Ruby
apache-2.0
203
main
2,176
# frozen_string_literal: true require_relative 'allowy_spec_helper' module Allowy RSpec.describe Registry do let(:context) { 123 } subject(:registry) { described_class.new(context) } describe '#access_control_for!' do it 'finds AC by appending Access to the subject' do expect(registry.ac...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/allowy/access_control_spec.rb
Ruby
apache-2.0
203
main
2,474
# frozen_string_literal: true require_relative 'allowy_spec_helper' module Allowy RSpec.describe 'checking permissions' do let(:access) { SampleAccess.new(123) } describe '#context as an arbitrary object' do subject { access.context } it 'returns the context passed to initialize' do ex...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/utils/workpool_spec.rb
Ruby
apache-2.0
203
main
4,027
require 'utils/workpool' RSpec.describe WorkPool do describe '#drain' do it 'runs blocks passed in' do wp = WorkPool.new(1) ran = false wp.submit do ran = true end wp.drain expect(ran).to be_truthy end it 'propagates arguments passed in to the inner block' do ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/utils/hash_utils_spec.rb
Ruby
apache-2.0
203
main
977
require 'utils/hash_utils' RSpec.describe HashUtils do describe 'dig' do it 'returns nested value' do hash = { foo: { bar: { baz: { qux: true } } } } expect(HashUtils.dig(hash, :foo, :bar, :baz, :qux)).to be_truthy end it 'returns partial digs' do hash = { foo: { bar: { baz: { qux: tru...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/utils/uri_utils_spec.rb
Ruby
apache-2.0
203
main
7,370
require 'spec_helper' require 'utils/uri_utils' RSpec.describe UriUtils do describe '.is_uri?' do it 'is false if the object is not a string' do expect(UriUtils.is_uri?(1)).to be false expect(UriUtils.is_uri?({})).to be false expect(UriUtils.is_uri?([])).to be false expect(UriUtils.is_uri...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/utils/time_utils_spec.rb
Ruby
apache-2.0
203
main
419
require 'utils/time_utils' RSpec.describe TimeUtils do describe 'to_nanoseconds' do it 'returns an integer' do time = Time.now expect(TimeUtils.to_nanoseconds(time)).to be_a(Integer) end it 'returns nanoseconds with the appropriate precision' do time = Time.at(1_536_269_249, 784_009.98...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/resource_match_spec.rb
Ruby
apache-2.0
203
main
6,622
require 'spec_helper' module VCAP::CloudController RSpec.describe ResourceMatch do include_context 'resource pool' let(:descriptors) do [ { 'sha1' => 0, 'size' => 500, 'mode' => '666' }, { 'sha1' => 1, 'size' => 1024, 'mode' => '666' }, { 'sha1' => 2, 'size' => 10_011, 'mode' =...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/stack_state_validator_spec.rb
Ruby
apache-2.0
203
main
13,500
require 'spec_helper' module VCAP::CloudController RSpec.describe StackStateValidator do describe '.validate_for_new_app!' do context 'when stack is Active' do let(:stack) { Stack.make(state: StackStates::STACK_ACTIVE, description: 'My ACTIVE stack') } it 'returns empty warnings' do ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/permissions_spec.rb
Ruby
apache-2.0
203
main
44,982
require 'spec_helper' module VCAP::CloudController RSpec.describe Permissions do let(:user) { User.make } let(:space) { Space.make(organization: org) } let(:org) { Organization.make } let(:space_guid) { space.guid } let(:org_guid) { org.guid } let(:permissions) { Permissions.new(user) } ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/telemetry_logger_spec.rb
Ruby
apache-2.0
203
main
9,040
require 'spec_helper' require 'cloud_controller/telemetry_logger' module VCAP::CloudController RSpec.describe TelemetryLogger do let(:file) { Tempfile.new('telemetry.log') } before do TelemetryLogger.init(ActiveSupport::Logger.new(file.path)) end context 'telemetry logging disabled' do ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/user_audit_info_spec.rb
Ruby
apache-2.0
203
main
1,277
require 'spec_helper' require 'cloud_controller/user_audit_info' module VCAP::CloudController RSpec.describe UserAuditInfo do let(:security_context) do class_double(SecurityContext, current_user_email: 'email', current_user_name: 'username', current_...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/yaml_config_spec.rb
Ruby
apache-2.0
203
main
1,278
require 'lightweight_spec_helper' require 'cloud_controller/yaml_config' module VCAP::CloudController RSpec.describe YAMLConfig do describe '.from_file' do let!(:tmpyml) do Tempfile.open('') do |tmpfile| tmpfile.write(file_contents) tmpfile end end context '...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/integer_array_serializer_spec.rb
Ruby
apache-2.0
203
main
1,841
require 'spec_helper' module VCAP::CloudController RSpec.describe IntegerArraySerializer do it 'registers with sequel' do expect(Sequel::Plugins::Serialization).to receive(:register_format) class Foo; extend IntegerArraySerializer; end end describe '.serializer' do let(:serializer) { I...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/secrets_fetcher_spec.rb
Ruby
apache-2.0
203
main
1,486
require 'spec_helper' require 'cloud_controller/secrets_fetcher' module VCAP::CloudController RSpec.describe SecretsFetcher do describe '.fetch_secrets_from_file' do let(:secrets_file) do file = Tempfile.new('secrets_file.yml') file.write(YAML.dump({ 'one' => secret_value_file.path, 'nested...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/port_generator_spec.rb
Ruby
apache-2.0
203
main
2,205
require 'spec_helper' module VCAP::CloudController RSpec.describe PortGenerator do let(:routing_api_client) { double('routing_api_client', router_group: router_group1) } let(:router_group1) { double('router_group1', type: router_group_type, guid: router_group_guid1) } let(:router_group_type) { 'tcp' } ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/adjective_noun_generator_spec.rb
Ruby
apache-2.0
203
main
830
require 'spec_helper' require 'cloud_controller/adjective_noun_generator' module VCAP::CloudController RSpec.describe AdjectiveNounGenerator do let(:generator) { AdjectiveNounGenerator.new } it 'generates a random adjective-noun pair each time it is called' do pairs = Set.new((1..10).to_a.map { genera...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/drain_spec.rb
Ruby
apache-2.0
203
main
5,711
require 'spec_helper' require 'cloud_controller/drain' module VCAP::CloudController RSpec.describe Drain do let(:log_dir) { Dir.mktmpdir } subject(:drain) { Drain.new(log_dir) } def log_contents File.open(File.join(log_dir, 'drain', 'drain.log')) do |file| yield file.read end en...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/organization_instance_usage_calculator_spec.rb
Ruby
apache-2.0
203
main
1,167
require 'spec_helper' module VCAP::CloudController RSpec.describe OrganizationInstanceUsageCalculator do describe '#get_instance_usage' do let!(:org) { Organization.make } let!(:space1) { Space.make(organization: org) } let!(:space2) { Space.make } let!(:space3) { Space.make(organization:...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/db_migrator_spec.rb
Ruby
apache-2.0
203
main
3,309
require 'spec_helper' RSpec.describe DBMigrator do let(:db) { Sequel::Model.db } before do Sequel.extension :migration end describe '#wait_for_migrations!' do let(:migrator) { DBMigrator.new(db, 1) } it 'blocks until migrations are current or newer' do expect(Sequel::Migrator).to receive(:...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/controller_factory_spec.rb
Ruby
apache-2.0
203
main
1,753
require 'spec_helper' module CloudController RSpec.describe ControllerFactory do describe '#create_controller' do before do config = VCAP::CloudController::Config.config logger = double(:logger).as_null_object env = {} params = {} body = '' sinatra = nil ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/database_uri_generator_spec.rb
Ruby
apache-2.0
203
main
1,960
require 'spec_helper' RSpec.describe VCAP::CloudController::DatabaseUriGenerator do let(:service_uris) { ['postgres://username:password@host/db'] } let(:services) { VCAP::CloudController::DatabaseUriGenerator.new(service_uris) } describe '#database_uri' do subject(:database_uri) { services.database_uri } ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/rack_app_builder_spec.rb
Ruby
apache-2.0
203
main
10,298
require 'spec_helper' module VCAP::CloudController RSpec.describe RackAppBuilder do subject(:builder) { RackAppBuilder.new } describe '#build' do let(:request_metrics) { double } let(:request_logs) { double } before do allow(CloudFoundry::Middleware::RequestMetrics).to receive(:ne...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/route_validator_spec.rb
Ruby
apache-2.0
203
main
8,242
require 'spec_helper' module VCAP::CloudController RSpec.describe RouteValidator do let(:space_quota) { SpaceQuotaDefinition.make } let(:space) { Space.make(space_quota_definition: space_quota, organization: space_quota.organization) } let(:route) { Route.new port:, host:, path:, domain:, space: } le...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/database_parts_parser_spec.rb
Ruby
apache-2.0
203
main
3,605
require 'spec_helper' require 'cloud_controller/database_parts_parser' RSpec.describe VCAP::CloudController::DatabasePartsParser do describe '.database_parts_from_connection' do context 'converts from a connection string' do it 'with a password containing no special characters' do parts = VCAP::Clo...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/organization_quota_usage_spec.rb
Ruby
apache-2.0
203
main
2,944
require 'spec_helper' module VCAP::CloudController RSpec.describe OrganizationQuotaUsage do let(:org) { Organization.make } let(:space1) { Space.make(organization: org) } let(:space2) { Space.make } let(:space3) { Space.make(organization: org) } subject(:org_usage) { OrganizationQuotaUsage.new(o...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/url_secret_obfuscator_spec.rb
Ruby
apache-2.0
203
main
1,445
require 'spec_helper' module CloudController RSpec.describe UrlSecretObfuscator do describe '#obfuscate' do context 'when the username and password are in the url' do let(:url) { 'https://amelialovescats:meowmeow@github.com/my-stuff&q=heart' } it 'obfuscates the username and password' do ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/seeds_spec.rb
Ruby
apache-2.0
203
main
29,338
require 'spec_helper' require 'cloud_controller/seeds' module VCAP::CloudController RSpec.describe VCAP::CloudController::Seeds do let(:config) { TestConfig.config_instance.clone } describe '.create_seed_stacks' do it 'populates stacks' do expect(Stack).to receive(:populate) Seeds.crea...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/domain_decorator_spec.rb
Ruby
apache-2.0
203
main
4,735
require 'cloud_controller/domain_decorator' module CloudController RSpec.describe DomainDecorator do describe '#intermediate_domains' do it 'returns an empty array if the name is nil' do expect(DomainDecorator.new(nil).intermediate_domains).to be_empty end it 'returns an empty array if...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/dependency_locator_spec.rb
Ruby
apache-2.0
203
main
21,294
require 'spec_helper' require 'cloud_controller/dependency_locator' require 'cloud_controller/diego/task_recipe_builder' RSpec.describe CloudController::DependencyLocator do subject(:locator) { CloudController::DependencyLocator.instance } let(:config) { TestConfig.config_instance } before { locator.config = c...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/standalone_metrics_webserver_spec.rb
Ruby
apache-2.0
203
main
2,057
require 'spec_helper' require 'cloud_controller/standalone_metrics_webserver' require 'cloud_controller/execution_context' module VCAP::CloudController RSpec.describe StandaloneMetricsWebserver do let(:port) { 1899 } let(:server) { StandaloneMetricsWebserver.new(port) } let(:puma_server) { instance_doubl...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/file_path_checker_spec.rb
Ruby
apache-2.0
203
main
1,072
require 'spec_helper' module VCAP module CloudController RSpec.describe FilePathChecker do subject(:checker) { FilePathChecker } context 'File uses a relative path' do context 'Path does not escape root' do it { is_expected.to be_safe_path 'subdir/file' } it { is_expected...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diagnostics_spec.rb
Ruby
apache-2.0
203
main
3,881
require 'spec_helper' module VCAP::CloudController RSpec.describe Diagnostics do let(:request_method) { 'GET' } let(:path) { '/path' } let(:query_string) { 'query' } let(:request_id) { 'request_id' } let(:request) do double('Request', { request_method:, path:,...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/runner_spec.rb
Ruby
apache-2.0
203
main
11,226
require 'spec_helper' module VCAP::CloudController RSpec.describe Runner do let(:valid_config_file_path) { File.join(Paths::CONFIG, 'cloud_controller.yml') } let(:config_file) { File.new(valid_config_file_path) } let(:periodic_updater) { instance_double(VCAP::CloudController::Metrics::PeriodicUpdater) } ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/bits_expiration_spec.rb
Ruby
apache-2.0
203
main
6,501
require 'spec_helper' module VCAP::CloudController RSpec.describe BitsExpiration do before do allow(Config).to receive(:config).and_return(config) end let(:app) { AppModel.make } let(:blobstore) do CloudController::DependencyLocator.instance.droplet_blobstore end let(:config) do...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/upload_buildpack_spec.rb
Ruby
apache-2.0
203
main
13,761
require 'spec_helper' module VCAP::CloudController RSpec.describe UploadBuildpack do let(:buildpack_blobstore) { double(:buildpack_blobstore).as_null_object } let!(:buildpack) { VCAP::CloudController::Buildpack.create_from_hash({ name: 'upload_binary_buildpack', stack: 'cider', position: 0 }) } let(:upl...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/steno_configurer_spec.rb
Ruby
apache-2.0
203
main
2,791
require 'spec_helper' module VCAP::CloudController RSpec.describe StenoConfigurer do let(:config_hash) do { level: 'fatal' } end subject(:configurer) { StenoConfigurer.new(config_hash) } before do allow(Steno).to receive(:init) end describe '.new' do it 'accepts a nil' do...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/validate_database_keys_spec.rb
Ruby
apache-2.0
203
main
17,134
require 'spec_helper' require 'cloud_controller/validate_database_keys' module VCAP::CloudController RSpec.describe ValidateDatabaseKeys do describe '.validate!' do let(:config) { Config.new({}) } it 'calls .can_decrypt_all_rows! and .validate_encryption_key_values_unchanged! in the correct order' d...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/check_stacks_spec.rb
Ruby
apache-2.0
203
main
3,125
require 'spec_helper' require 'yaml' require 'cloud_controller/check_stacks' require 'tasks/rake_config' module VCAP::CloudController RSpec.describe CheckStacks do let(:stack_file_contents) do { 'default' => 'cflinuxfs4', 'stacks' => [ cflinuxfs4 ], 'deprecated_sta...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/params_hashifier_spec.rb
Ruby
apache-2.0
203
main
1,796
require 'spec_helper' require 'cloud_controller/params_hashifier' module VCAP::CloudController class FakeController include VCAP::CloudController::ParamsHashifier attr_reader :params def initialize(params) @params = params end end RSpec.describe ParamsHashifier do let(:controller) { ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/resource_pool_spec.rb
Ruby
apache-2.0
203
main
2,796
require 'spec_helper' module VCAP::CloudController RSpec.describe ResourcePool do include_context 'resource pool' describe '#match_resources' do before do @resource_pool.add_directory(@tmpdir) end it 'calls match_resources on ResourceMatch object' do descriptors = @descrip...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/encryptor_spec.rb
Ruby
apache-2.0
203
main
26,385
require 'spec_helper' module VCAP::CloudController RSpec.describe Encryptor do let(:salt) { Encryptor.generate_salt } let(:encryption_iterations) { Encryptor::ENCRYPTION_ITERATIONS } describe 'generating some salt' do it 'returns a short, random string' do expect(salt.length).to be(16) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/execution_context_spec.rb
Ruby
apache-2.0
203
main
2,624
require 'spec_helper' require 'tasks/rake_config' require 'cloud_controller/execution_context' module VCAP::CloudController RSpec.describe ExecutionContext do context 'ExecutionInfo' do let(:exec_info) { ExecutionContext::CC_WORKER } it 'has correct attributes' do expect(exec_info.process_ty...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/process_route_handler_spec.rb
Ruby
apache-2.0
203
main
7,813
require 'spec_helper' require 'cloud_controller/process_route_handler' module VCAP::CloudController RSpec.describe ProcessRouteHandler do subject(:handler) { ProcessRouteHandler.new(process, runners) } let(:runners) { instance_double(Runners, runner_for_process: runner) } let(:runner) { instance_double(D...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/membership_spec.rb
Ruby
apache-2.0
203
main
19,099
require 'spec_helper' module VCAP::CloudController RSpec.describe Membership do let(:user) { User.make } let!(:space) { Space.make(organization:) } let(:organization) { Organization.make } let(:membership) { Membership.new(user) } describe '#role_applies?' do context 'when space roles are...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/byte_quantity_spec.rb
Ruby
apache-2.0
203
main
6,439
# Derived from the palm_civet library # Copyright (c) 2013 Anand Gaitonde # Licensed under the MIT License # https://github.com/goodmustache/palm_civet require 'spec_helper' require 'cloud_controller/byte_quantity' module VCAP::CloudController RSpec.describe ByteQuantity do describe '#byte_size' do it 'pr...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/process_observer_spec.rb
Ruby
apache-2.0
203
main
11,009
require 'spec_helper' module VCAP::CloudController RSpec.describe ProcessObserver do let(:stagers) { double(:stagers, stager_for_build: stager) } let(:runners) { instance_double(Runners, runner_for_process: runner) } let(:stager) { double(:stager) } let(:runner) { instance_double(Diego::Runner, stop:...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/db_dataset_spec.rb
Ruby
apache-2.0
203
main
1,569
require 'spec_helper' module VCAP::CloudController RSpec.describe Sequel::Dataset do describe '#post_load', type: :model do let(:logs) { StringIO.new } let(:logger) { Logger.new(logs) } let(:db) { Space.db } before do db.loggers << logger end describe 'with logging e...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/api_metrics_webserver_spec.rb
Ruby
apache-2.0
203
main
1,437
require 'spec_helper' module VCAP::CloudController RSpec.describe ApiMetricsWebserver do let(:metrics_webserver) { described_class.new } let(:puma_server_double) { instance_double(Puma::Server, add_tcp_listener: nil, add_unix_listener: nil, run: nil) } let(:config) { double('config', get: nil) } bef...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/install_buildpacks_spec.rb
Ruby
apache-2.0
203
main
14,927
require 'spec_helper' module VCAP::CloudController RSpec.describe InstallBuildpacks do describe 'installs buildpacks' do let(:installer) { InstallBuildpacks.new(TestConfig.config_instance) } let(:enqueuer) { instance_double(Jobs::Enqueuer) } let(:job_factory) { instance_double(Jobs::Runtime::B...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/config_spec.rb
Ruby
apache-2.0
203
main
22,218
require 'spec_helper' module VCAP::CloudController RSpec.describe Config do let(:test_config_hash) do { packages: { fog_connection: {}, fog_aws_storage_options: { encryption: 'AES256' }, fog_gcp_storage_options: {}, app_package_directory...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/random_route_generator_spec.rb
Ruby
apache-2.0
203
main
770
require 'spec_helper' module VCAP::CloudController RSpec.describe RandomRouteGenerator do let(:generator) { RandomRouteGenerator.new } it 'generates a random route each time it is called' do routes = Set.new((1..10).to_a.map { generator.route }) expect(routes.size).to be > 1 end it 'gen...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/isolation_segment_selector_spec.rb
Ruby
apache-2.0
203
main
3,118
require 'spec_helper' module VCAP::CloudController RSpec.describe IsolationSegmentSelector do describe '.for_space' do let(:space) { Space.make } let(:org) { space.organization } let(:assigner) { VCAP::CloudController::IsolationSegmentAssign.new } let(:isolation_segment_model) { VCAP::Clo...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/deployments/deployment_target_state_spec.rb
Ruby
apache-2.0
203
main
8,680
require 'spec_helper' require 'cloud_controller/deployments/deployment_target_state' module VCAP::CloudController RSpec.describe DeploymentTargetState do subject(:target_state) { DeploymentTargetState.new(app, message) } let(:app) { AppModel.make(environment_variables: { 'foo' => 'bar' }) } let(:droplet)...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/errors/compound_error_spec.rb
Ruby
apache-2.0
203
main
1,087
require 'lightweight_spec_helper' require 'cloud_controller/errors/compound_error' require 'cloud_controller/errors/api_error' module CloudController::Errors RSpec.describe CompoundError do describe '#underlying_errors' do it 'returns the provided list of API errors' do errors = [ ApiErro...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/errors/not_found_spec.rb
Ruby
apache-2.0
203
main
979
require 'lightweight_spec_helper' require 'cloud_controller/errors/not_found' module CloudController::Errors RSpec.describe NotFound do context 'when a wrapped error is provided' do let(:message) { 'uh oh' } let(:exception_details) { create_details(message) } let(:error) { CloudController::Erro...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/errors/api_error_spec.rb
Ruby
apache-2.0
203
main
2,688
require 'lightweight_spec_helper' require 'cloud_controller/errors/api_error' module CloudController::Errors RSpec.describe ApiError do def create_details(message) double(Details, name: message, response_code: 400, code: 12_345, message_format: 'Before %s...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/errors/details_spec.rb
Ruby
apache-2.0
203
main
896
require 'lightweight_spec_helper' require 'cloud_controller/errors/details' module CloudController::Errors RSpec.describe Details do describe '.new(name)' do let(:name) { 'DomainInvalid' } subject(:details) do Details.new(name) end it 'knows the error name' do expect(det...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/errors/v3/api_error_spec.rb
Ruby
apache-2.0
203
main
2,527
require 'lightweight_spec_helper' require 'cloud_controller/errors/v3/api_error' module CloudController::Errors::V3 RSpec.describe ApiError do def create_details(message) double(Details, name: message, response_code: 400, code: 12_345, message_format: 'Be...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/errors/v3/details_spec.rb
Ruby
apache-2.0
203
main
975
require 'lightweight_spec_helper' require 'cloud_controller/errors/v3/details' module CloudController::Errors RSpec.describe V3::Details do describe '.new(name)' do let(:name) { 'ServiceBrokerNotRemovable' } subject(:details) do V3::Details.new(name) end it 'knows the error name...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/paging/sequel_paginator_spec.rb
Ruby
apache-2.0
203
main
17,610
require 'spec_helper' require 'cloud_controller/paging/sequel_paginator' require 'cloud_controller/paging/pagination_options' module VCAP::CloudController RSpec.describe SequelPaginator do class TableWithoutGuid < Sequel::Model(:table_without_guid); end let(:paginator) { SequelPaginator.new } describe ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/paging/pagination_options_spec.rb
Ruby
apache-2.0
203
main
6,359
require 'spec_helper' require 'cloud_controller/paging/pagination_options' module VCAP::CloudController RSpec.describe PaginationOptions do describe '.from_params' do let(:params) do { page: 4, per_page: 56, order_by: '+updated_at', extra: 'stuff' } ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/paging/list_paginator_spec.rb
Ruby
apache-2.0
203
main
3,065
require 'spec_helper' require 'cloud_controller/paging/list_paginator' require 'cloud_controller/paging/pagination_options' module VCAP::CloudController RSpec.describe ListPaginator do let(:paginator) { ListPaginator.new } describe '#get_page' do let(:list) { [app_model1, app_model2] } let(:defa...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/packager/local_bits_packer_spec.rb
Ruby
apache-2.0
203
main
16,908
require 'spec_helper' require 'cloud_controller/packager/local_bits_packer' module CloudController::Packager RSpec.describe LocalBitsPacker do subject(:packer) { LocalBitsPacker.new } let(:uploaded_files_path) { File.join(local_tmp_dir, 'good.zip') } let(:input_zip) { File.join(Paths::FIXTURES, 'good.zi...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/packager/package_upload_handler_spec.rb
Ruby
apache-2.0
203
main
3,571
require 'spec_helper' require 'cloud_controller/packager/package_upload_handler' module CloudController::Packager RSpec.describe PackageUploadHandler do subject(:packer) { PackageUploadHandler.new(package.guid, uploaded_files_path, cached_files_fingerprints) } let(:package) { VCAP::CloudController::PackageM...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/job/job_priority_overwriter_spec.rb
Ruby
apache-2.0
203
main
1,241
require 'spec_helper' require 'cloud_controller/job/job_priority_overwriter' module VCAP::CloudController RSpec.describe JobPriorityOverwriter do let(:config) do Config.new({ jobs: { priorities: { 'resource1.create': -20, ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/egress_rules_spec.rb
Ruby
apache-2.0
203
main
9,752
require 'spec_helper' module VCAP::CloudController module Diego RSpec.describe EgressRules do subject(:egress_rules) { EgressRules.new } describe '#staging_protobuf_rules' do let(:space) { VCAP::CloudController::Space.make } let(:process) { VCAP::CloudController::ProcessModelFactory....
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/task_environment_spec.rb
Ruby
apache-2.0
203
main
9,242
require 'spec_helper' require 'cloud_controller/diego/task_environment' module VCAP::CloudController::Diego RSpec.describe TaskEnvironment do let(:app_env_vars) { { 'ENV_VAR_2' => 'jeff' } } let(:app) { VCAP::CloudController::AppModel.make(environment_variables: app_env_vars, name: 'utako') } let(:task) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/task_completion_callback_generator_spec.rb
Ruby
apache-2.0
203
main
1,025
require 'spec_helper' require 'cloud_controller/diego/task_completion_callback_generator' module VCAP::CloudController module Diego RSpec.describe TaskCompletionCallbackGenerator do subject(:generator) { TaskCompletionCallbackGenerator.new(TestConfig.config_instance) } describe '#generate' do ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/desire_app_handler_spec.rb
Ruby
apache-2.0
203
main
1,352
require 'spec_helper' module VCAP::CloudController module Diego RSpec.describe DesireAppHandler do describe '.create_or_update_app' do let(:client) { instance_double(BbsAppsClient) } let(:desired_lrp) { double(:desired_lrp) } let(:process_guid) { 'the-process-guid' } let(:ge...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/environment_spec.rb
Ruby
apache-2.0
203
main
5,773
require 'spec_helper' require 'presenters/system_environment/system_env_presenter' require_relative '../../../../../lib/vcap/vars_builder' module VCAP::CloudController::Diego RSpec.describe Environment do let(:process) { VCAP::CloudController::ProcessModelFactory.make(environment_json: environment, memory: 200) ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/lifecycle_bundle_uri_generator_spec.rb
Ruby
apache-2.0
203
main
1,185
require 'spec_helper' module VCAP::CloudController module Diego RSpec.describe LifecycleBundleUriGenerator do before do TestConfig.override(diego: { file_server_url: 'https://file-server.example.com:1234' }) end it 'creates a file server url for a bundle path' do expect(Lifecyc...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/app_recipe_builder_spec.rb
Ruby
apache-2.0
203
main
66,460
require 'spec_helper' module VCAP::CloudController module Diego RSpec.describe AppRecipeBuilder do subject(:builder) do AppRecipeBuilder.new( config:, process:, ssh_key: ) end let(:ssh_key) { SSHKey.new } shared_examples_for 'creating a desi...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/task_cpu_weight_calculator_spec.rb
Ruby
apache-2.0
203
main
3,009
require 'spec_helper' require 'cloud_controller/diego/task_cpu_weight_calculator' module VCAP::CloudController module Diego RSpec.describe TaskCpuWeightCalculator do describe '#calculate with default values' do let(:calculator) { TaskCpuWeightCalculator.new(memory_in_mb: memory) } let(:min_...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/bbs_task_client_spec.rb
Ruby
apache-2.0
203
main
9,435
require 'spec_helper' require 'cloud_controller/diego/task_recipe_builder' require 'cloud_controller/diego/bbs_task_client' module VCAP::CloudController::Diego RSpec.describe BbsTaskClient do let(:task) { instance_double(VCAP::CloudController::TaskModel, guid: 'task-guid') } let(:config) { instance_double(VC...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/task_recipe_builder_spec.rb
Ruby
apache-2.0
203
main
35,488
require 'spec_helper' module VCAP::CloudController module Diego RSpec.describe TaskRecipeBuilder do subject(:task_recipe_builder) { TaskRecipeBuilder.new } let(:org) { Organization.make(name: 'MyOrg', guid: 'org-guid') } let(:space) { Space.make(name: 'MySpace', guid: 'space-guid', organization...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/service_binding_files_builder_spec.rb
Ruby
apache-2.0
203
main
16,275
require 'spec_helper' require 'cloud_controller/diego/service_binding_files_builder' module VCAP::CloudController::Diego RSpec.shared_examples 'mapping of type and provider' do |label| it 'sets type and provider to the service label' do expect(service_binding_files.find { |f| f.path == "#{directory}/type" ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/failure_reason_sanitizer_spec.rb
Ruby
apache-2.0
203
main
4,429
require 'spec_helper' require 'cloud_controller/diego/failure_reason_sanitizer' module VCAP::CloudController module Diego RSpec.describe FailureReasonSanitizer do describe '#sanitize' do context 'when the message is InsufficientResources' do it 'returns an InsufficientResources memory err...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/process_guid_spec.rb
Ruby
apache-2.0
203
main
1,161
require 'spec_helper' require 'cloud_controller/diego/process_guid' module VCAP::CloudController::Diego RSpec.describe ProcessGuid do let(:process) do VCAP::CloudController::ProcessModelFactory.make end describe 'process_guid' do it 'returns the appropriate composed Diego process guid' do ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/lifecycle_protocol_spec.rb
Ruby
apache-2.0
203
main
1,126
require 'spec_helper' require 'cloud_controller/diego/lifecycle_protocol' require 'cloud_controller/diego/cnb/lifecycle_protocol' module VCAP::CloudController::Diego RSpec.describe LifecycleProtocol do describe '.protocol_for_type' do subject(:protocol) { LifecycleProtocol.protocol_for_type(type) } ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/messenger_spec.rb
Ruby
apache-2.0
203
main
4,523
require 'spec_helper' require 'cloud_controller/diego/bbs_stager_client' module VCAP::CloudController module Diego RSpec.describe Messenger do subject(:messenger) { Messenger.new } let(:bbs_stager_client) { instance_double(BbsStagerClient) } let(:config) { TestConfig.config_instance } le...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/bbs_instances_client_spec.rb
Ruby
apache-2.0
203
main
6,136
require 'spec_helper' module VCAP::CloudController::Diego RSpec.describe BbsInstancesClient do subject(:client) { BbsInstancesClient.new(bbs_client) } let(:bbs_client) { instance_double(::Diego::Client) } describe '#lrp_instances' do let(:bbs_response) { ::Diego::Bbs::Models::ActualLRPsResponse.ne...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/windows_environment_sage_spec.rb
Ruby
apache-2.0
203
main
2,216
require 'spec_helper' require 'cloud_controller/diego/windows_environment_sage' module VCAP::CloudController::Diego RSpec.describe WindowsEnvironmentSage do let(:parent_app) { VCAP::CloudController::AppModel.make } let(:credential_refs) { [] } describe '.ponder' do before do allow(parent_a...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/runner_spec.rb
Ruby
apache-2.0
203
main
5,924
require 'spec_helper' module VCAP::CloudController module Diego RSpec.describe Runner do let(:messenger) { instance_double(Messenger) } let(:process) { ProcessModelFactory.make(state: 'STARTED') } let(:protocol) { instance_double(Diego::Protocol) } let(:default_health_check_timeout) { 999...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/stager_spec.rb
Ruby
apache-2.0
203
main
7,299
require 'spec_helper' require 'cloud_controller/diego/stager' require 'cloud_controller/diego/messenger' require 'cloud_controller/diego/buildpack/staging_completion_handler' module VCAP::CloudController module Diego RSpec.describe Stager do subject(:stager) { Stager.new(config) } let(:messenger) { ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/tasks_sync_spec.rb
Ruby
apache-2.0
203
main
14,644
require 'spec_helper' module VCAP::CloudController module Diego RSpec.describe TasksSync, job_context: :clock do subject { TasksSync.new(config:) } let(:config) { instance_double(Config) } let(:bbs_task_client) { instance_double(BbsTaskClient) } let(:bbs_tasks) { [] } let(:fake_wor...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/task_completion_handler_spec.rb
Ruby
apache-2.0
203
main
4,265
require 'spec_helper' require 'cloud_controller/diego/task_completion_handler' module VCAP::CloudController module Diego RSpec.describe TaskCompletionHandler do let!(:task) { TaskModel.make(:pending) } let(:handler) { TaskCompletionHandler.new } let(:logger) { instance_double(Steno::Logger, inf...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/bbs_apps_client_spec.rb
Ruby
apache-2.0
203
main
20,453
require 'spec_helper' module VCAP::CloudController::Diego RSpec.describe BbsAppsClient do subject(:client) { BbsAppsClient.new(bbs_client, config) } let(:config) { VCAP::CloudController::Config.new({ default_health_check_timeout: 99 }) } describe '#desire_app' do let(:bbs_client) { instance_double...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/droplet_url_generator_spec.rb
Ruby
apache-2.0
203
main
1,566
require 'spec_helper' require 'cloud_controller/diego/droplet_url_generator' module VCAP::CloudController module Diego RSpec.describe DropletUrlGenerator do let(:hostname) { 'api.internal.cf' } let(:external_port) { 8181 } let(:tls_port) { 8182 } let(:mtls) { false } subject(:gener...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/staging_action_builder_spec.rb
Ruby
apache-2.0
203
main
1,206
require 'spec_helper' require 'cloud_controller/diego/staging_action_builder' module VCAP::CloudController module Diego RSpec.describe StagingActionBuilder do subject(:builder) { described_class.new(config, nil, nil, nil, nil, nil, nil) } let(:config) { Config.new({ staging: { legacy_md5_buildpack_p...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/staging_request_spec.rb
Ruby
apache-2.0
203
main
3,730
require 'spec_helper' require 'cloud_controller/diego/staging_request' module VCAP::CloudController::Diego RSpec.describe StagingRequest do let(:isolation_segment_model) { VCAP::CloudController::IsolationSegmentModel.make } let(:process) do VCAP::CloudController::ProcessModelFactory.make( stack...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/bbs_stager_client_spec.rb
Ruby
apache-2.0
203
main
4,436
require 'spec_helper' require 'cloud_controller/diego/bbs_stager_client' require 'models/runtime/package_model' module VCAP::CloudController::Diego RSpec.describe BbsStagerClient do let(:staging_guid) { 'staging-guid' } let(:bbs_client) { instance_double(::Diego::Client) } let(:config) { VCAP::CloudContr...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/ssh_key_spec.rb
Ruby
apache-2.0
203
main
3,301
require 'spec_helper' require 'cloud_controller/diego/ssh_key' module VCAP::CloudController module Diego RSpec.describe SSHKey do let(:ssh_key) { SSHKey.new(1024) } describe '#authorized_key' do it 'returns an open ssh format authorized key' do expect(ssh_key.authorized_key).to mat...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/task_environment_variable_collector_spec.rb
Ruby
apache-2.0
203
main
3,022
require 'spec_helper' require 'cloud_controller/diego/task_environment_variable_collector' module VCAP::CloudController module Diego RSpec.describe TaskEnvironmentVariableCollector do let(:task) { TaskModel.make command: command, name: 'my-task' } let(:command) { 'echo "hello"' } let(:environme...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/lifecycle_protocol_shared.rb
Ruby
apache-2.0
203
main
518
RSpec.shared_examples_for 'a lifecycle protocol' do let(:process) { double(:process) } let(:staging_details) { double(:staging_details) } let(:config) { instance_double(VCAP::CloudController::Config) } it 'provides lifecycle data' do lifecycle_data = lifecycle_protocol.lifecycle_data(staging_details) e...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/main_lrp_action_builder_spec.rb
Ruby
apache-2.0
203
main
17,139
require 'spec_helper' module VCAP::CloudController module Diego RSpec.describe MainLRPActionBuilder do describe '.build' do let(:app_model) do AppModel.make( droplet: DropletModel.make(state: 'STAGED'), enable_ssh: false ) end before do ...
github
cloudfoundry/cloud_controller_ng
https://github.com/cloudfoundry/cloud_controller_ng
spec/unit/lib/cloud_controller/diego/buildpack_entry_generator_spec.rb
Ruby
apache-2.0
203
main
6,274
require 'spec_helper' require 'cloud_controller/diego/buildpack_entry_generator' module VCAP::CloudController module Diego RSpec.describe BuildpackEntryGenerator do subject(:buildpack_entry_generator) { BuildpackEntryGenerator.new(blobstore_url_generator, Lifecycles::BUILDPACK) } let(:admin_buildpac...