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
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/gitaly/recipes/gitaly_spec.rb
Ruby
apache-2.0
225
master
51,417
require 'chef_helper' RSpec.describe 'gitaly' do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(runit_service)).converge('gitlab::default') } let(:config_path) { '/var/opt/gitlab/gitaly/config.toml' } let(:gitaly_config) { chef_run.template(config_path) } let(:runtime_dir) { '/var/opt/gitlab/gitaly/us...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/gitaly/libraries/gitaly_spec.rb
Ruby
apache-2.0
225
master
606
require 'chef_helper' RSpec.describe Gitaly do let(:chef_run) { ChefSpec::SoloRunner.converge('gitlab::default') } before { allow(Gitlab).to receive(:[]).and_call_original } describe 'by default' do it 'provides settings needed for gitaly to run' do expect(chef_run.node['gitaly']['env']).to include( ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/monitoring/recipes/pgbouncer-exporter_spec.rb
Ruby
apache-2.0
225
master
4,090
# # Copyright:: Copyright (c) 2018 GitLab Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/monitoring/recipes/node-exporter_spec.rb
Ruby
apache-2.0
225
master
4,902
require 'chef_helper' RSpec.describe 'monitoring::node-exporter' do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(runit_service)).converge('gitlab::default') } let(:default_vars) do { 'SSL_CERT_DIR' => '/opt/gitlab/embedded/ssl/certs/', 'GODEBUG' => 'tlsmlkem=0', } end before do ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/monitoring/recipes/postgres_exporter_spec.rb
Ruby
apache-2.0
225
master
6,982
require 'chef_helper' RSpec.describe 'monitoring::postgres-exporter' do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(runit_service)).converge('gitlab::default') } let(:node) { chef_run.node } let(:default_vars) do { 'DATA_SOURCE_NAME' => 'host=/var/opt/gitlab/postgresql user=gitlab-psql data...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/monitoring/recipes/redis_exporter_spec.rb
Ruby
apache-2.0
225
master
5,596
require 'chef_helper' RSpec.describe 'monitoring::redis-exporter' do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(runit_service)).converge('gitlab::default') } let(:node) { chef_run.node } let(:default_vars) do { 'SSL_CERT_DIR' => '/opt/gitlab/embedded/ssl/certs/', 'GODEBUG' => 'tlsmlk...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/monitoring/recipes/prometheus_spec.rb
Ruby
apache-2.0
225
master
17,541
require 'chef_helper' RSpec.describe 'monitoring::prometheus' do let(:prometheus_scrape_config) do { job_name: "prometheus", static_configs: [ { targets: [ "localhost:9090" ] } ] } end let(:nginx_scrape_config) do { job_name: "ng...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/monitoring/recipes/gitlab-exporter_spec.rb
Ruby
apache-2.0
225
master
17,352
require 'chef_helper' RSpec.describe 'monitoring::gitlab-exporter' do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(runit_service)).converge('gitlab::default') } let(:default_env_vars) do { 'MALLOC_CONF' => 'dirty_decay_ms:0,muzzy_decay_ms:0', 'RUBY_GC_HEAP_INIT_SLOTS' => 80000, 'RU...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/monitoring/recipes/alertmanager_spec.rb
Ruby
apache-2.0
225
master
5,013
require 'chef_helper' alertmanager_yml_output = <<-ALERTMANAGERYML --- global: smtp_from: gitlab-omnibus smtp_smarthost: testhost:25 templates: [] route: receiver: default-receiver routes: [] receivers: - name: default-receiver email_configs: - to: admin@example.com inhibit_rules:...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/monitoring/libraries/prometheus_helper_spec.rb
Ruby
apache-2.0
225
master
1,667
# # Copyright:: Copyright (c) 2017 GitLab Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/monitoring/libraries/prometheus_spec.rb
Ruby
apache-2.0
225
master
668
require 'chef_helper' RSpec.describe Prometheus do before { Services.add_services('gitlab', Services::BaseServices.list) } it 'should return a list of known services' do expect(Prometheus.services).to match_array(%w( prometheus ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/redis/recipes/redis_spec.rb
Ruby
apache-2.0
225
master
19,777
require 'chef_helper' RSpec.describe 'redis' do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(redis_service runit_service)).converge('gitlab::default') } let(:redis_conf) { '/var/opt/gitlab/redis/redis.conf' } before do allow(Gitlab).to receive(:[]).and_call_original end context 'by default' ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/nginx/resources/nginx_configuration_spec.rb
Ruby
apache-2.0
225
master
1,287
require 'chef_helper' RSpec.describe 'nginx_configuration' do let(:runner) do ChefSpec::SoloRunner.new(step_into: %w(nginx_configuration)) end context 'create' do let(:chef_run) { runner.converge('gitlab-base::config', 'test_nginx::enable') } before do allow_any_instance_of(OmnibusHelper).to ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/patroni/recipes/patroni_spec.rb
Ruby
apache-2.0
225
master
24,878
require 'chef_helper' require 'yaml' RSpec.describe 'patroni cookbook' do before do allow(Gitlab).to receive(:[]).and_call_original end let(:chef_run) do ChefSpec::SoloRunner.new(step_into: %w(database_objects)).converge('gitlab-ee::default') end it 'should be disabled by default' do expect(che...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/patroni/libraries/patroni_helper_spec.rb
Ruby
apache-2.0
225
master
4,593
require 'chef_helper' RSpec.describe PatroniHelper do let(:chef_run) do ChefSpec::SoloRunner.new(step_into: %w(patroni)).converge('gitlab-ee::default') end subject(:helper) { PatroniHelper.new(chef_run.node) } let(:pg_helper) { PgHelper.new(chef_run.node) } before do allow(Gitlab).to receive(:[]).a...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/letsencrypt/libraries/lets_encrypt_spec.rb
Ruby
apache-2.0
225
master
5,864
require 'chef_helper' RSpec.describe LetsEncrypt do subject { ::LetsEncrypt } before do allow(Gitlab).to receive(:[]).and_call_original end context '.parse_variables' do it 'calls to parse_enable' do expect(subject).to receive(:parse_enable) subject.parse_variables end end conte...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/letsencrypt/recipes/letsencrypt_spec.rb
Ruby
apache-2.0
225
master
7,561
require 'chef_helper' RSpec.describe 'enabling letsencrypt' do before do allow(Gitlab).to receive(:[]).and_call_original stub_gitlab_rb(external_url: 'https://fakehost.example.com') end let(:chef_run) { ChefSpec::SoloRunner.converge('gitlab::default') } context 'unspecified uses LetsEncrypt.should_au...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/letsencrypt/resources/letsencrypt_certificate_spec.rb
Ruby
apache-2.0
225
master
5,935
require 'chef_helper' RSpec.describe 'gitlab::letsencrypt' do let(:chef_run) do ChefSpec::SoloRunner.new(step_into: %(letsencrypt_certificate)).converge('gitlab::default') end before do allow(Gitlab).to receive(:[]).and_call_original stub_gitlab_rb( external_url: 'https://fakehost.example.com'...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/registry/libraries/registry_pg_helper_spec.rb
Ruby
apache-2.0
225
master
3,021
require 'chef_helper' RSpec.describe RegistryPgHelper do let(:node) { chef_run.node } let(:chef_run) { ChefSpec::SoloRunner.new.converge('gitlab::default') } let(:helper) { described_class.new(node) } before do allow(Gitlab).to receive(:[]).and_call_original # Mock the is_ready? method to prevent actu...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/registry/recipes/enable_spec.rb
Ruby
apache-2.0
225
master
586
require 'chef_helper' RSpec.describe 'registry::enable' do let(:chef_runner) do ChefSpec::SoloRunner.new(step_into: %w(registry_enable)) end let(:chef_run) do chef_runner.converge('gitlab-ee::default') end before do allow(Gitlab).to receive(:[]).and_call_original stub_gitlab_rb(registry_ext...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/registry/recipes/registry_spec.rb
Ruby
apache-2.0
225
master
40,179
require 'chef_helper' RSpec.describe 'registry recipe' do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(runit_service registry_database_objects nginx_configuration)).converge('gitlab::default') } before do allow(Gitlab).to receive(:[]).and_call_original end it 'sets default attributes' do e...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/registry/recipes/database_migrations_spec.rb
Ruby
apache-2.0
225
master
6,532
require 'chef_helper' RSpec.describe 'registry::database_migrations' do let(:chef_run) { ChefSpec::SoloRunner.new.converge('gitlab::default') } let(:registry_pg_helper) { instance_double(RegistryPgHelper) } before do allow(Gitlab).to receive(:[]).and_call_original allow(RegistryPgHelper).to receive(:new...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/registry/recipes/disable_spec.rb
Ruby
apache-2.0
225
master
393
require 'chef_helper' RSpec.describe 'registry::disable' do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(runit_service)).converge('gitlab::default') } before do allow(Gitlab).to receive(:[]).and_call_original stub_gitlab_rb(registry: { enable: false }) end it 'disables the registry service...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/registry/templates/registry-env-db_user_spec.rb
Ruby
apache-2.0
225
master
4,849
require 'chef_helper' RSpec.describe 'registry-env-db_user.erb template' do let(:chef_runner) do ChefSpec::SoloRunner.new(step_into: %w(registry_enable)) end let(:chef_run) do chef_runner.converge('gitlab-ee::default') end let(:backup_template_path) { '/opt/gitlab/etc/gitlab-backup/env/env-backup_u...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/registry/resources/database_migrations_spec.rb
Ruby
apache-2.0
225
master
2,826
require 'chef_helper' RSpec.describe 'registry_database_migrations' do let(:runner) do ChefSpec::SoloRunner.new(step_into: %w(registry_database_migrations)) do |node| node.normal['registry']['auto_migrate'] = true end end let(:chef_run) { runner.converge('test_registry::registry_database_migration...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/registry/resources/database_objects_spec.rb
Ruby
apache-2.0
225
master
11,635
require 'chef_helper' RSpec.describe 'registry_database_objects' do def build_node_attrs(overrides = {}) base = { 'registry' => { 'user' => 'registry', 'password' => 'md5registrypassword', 'dbname' => 'registry', 'database_backup_username' => 'registry_backup', 'data...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/resources/account_spec.rb
Ruby
apache-2.0
225
master
631
require 'chef_helper' RSpec.describe 'account' do let(:runner) do ChefSpec::SoloRunner.new(step_into: %w(account)) end context 'create' do let(:chef_run) { runner.converge('test_package::account_create') } it 'creates user' do expect(chef_run).to create_user('foobar').with_username('foo') ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/resources/env_dir_spec.rb
Ruby
apache-2.0
225
master
695
require 'chef_helper' RSpec.describe 'env_dir' do let(:runner) { ChefSpec::SoloRunner.new(step_into: %w(env_dir)) } let(:chef_run) { runner.converge("test_package::env_dir_create") } after do FileUtils.rm_rf('/tmp/env') end it 'creates env directory' do expect(chef_run).to create_directory('/tmp/en...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/resources/gitlab_sysctl_spec.rb
Ruby
apache-2.0
225
master
1,911
require 'chef_helper' RSpec.describe 'sysctl' do let(:runner) { ChefSpec::SoloRunner.new(step_into: %w(gitlab_sysctl)) } let(:chef_run) { runner.converge("package::sysctl", "test_package::gitlab_sysctl_create") } let(:conf) { '90-omnibus-gitlab-foo.conf' } context 'with default values' do it 'creates sysc...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/resources/storage_directory_spec.rb
Ruby
apache-2.0
225
master
922
require 'chef_helper' RSpec.describe 'storage_directory' do let(:runner) do ChefSpec::SoloRunner.new(step_into: %w(storage_directory)) do |node| node.normal['gitlab']['manage_storage_directories']['enable'] = true end end let(:chef_run) { runner.converge("test_package::storage_directory_create") } ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/resources/version_file_spec.rb
Ruby
apache-2.0
225
master
696
require 'chef_helper' version_file_path = '/tmp/VERSION_TEST' version_check_cmd = 'echo 1.0.0-test' # Collect version as the custom resource would version = VersionHelper.version(version_check_cmd) RSpec.describe 'version_file' do let(:runner) { ChefSpec::SoloRunner.new(step_into: %w(version_file)) } let(:chef_r...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/resources/templatesymlink_spec.rb
Ruby
apache-2.0
225
master
800
require 'chef_helper' RSpec.describe 'templatesymlink' do let(:runner) do ChefSpec::SoloRunner.new(step_into: %w(templatesymlink)) end context 'create' do let(:chef_run) { runner.converge('test_package::templatesymlink_create') } it 'creates symlinks' do expect(chef_run).to create_link('/opt/...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/recipes/runit_spec.rb
Ruby
apache-2.0
225
master
3,335
require 'chef_helper' RSpec.describe 'package::runit' do before do allow(Chef::Log).to receive(:info).and_call_original allow(Chef::Log).to receive(:warn).and_call_original allow(File).to receive(:directory?).and_call_original allow(File).to receive(:directory?).with('/run/systemd/system').and_return...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/recipes/users_spec.rb
Ruby
apache-2.0
225
master
2,270
require 'chef_helper' RSpec.describe 'package::users' do let(:chef_run) { ChefSpec::SoloRunner.new.converge('gitlab::default') } before do allow(Gitlab).to receive(:[]).and_call_original end context 'with default attributes' do it 'creates gitlab user' do account_params = { username: 'g...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/recipes/show_config_spec.rb
Ruby
apache-2.0
225
master
588
require 'chef_helper' RSpec.describe 'package::show_config' do let(:chef_run) { ChefSpec::SoloRunner.converge('gitlab-base::show_config') } it 'outputs user-defined gitlab.rb configuration to stdout' do allow(Gitlab).to receive(:[]).and_call_original stub_gitlab_rb( patroni: { scope: 'test-cluster' ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/recipes/runit_systemd_spec.rb
Ruby
apache-2.0
225
master
3,175
require 'chef_helper' RSpec.describe 'package::runit_systemd' do let(:chef_run) { ChefSpec::SoloRunner.converge('gitlab-base::config', 'package::runit_systemd') } before do allow(Gitlab).to receive(:[]).and_call_original end describe 'setting TasksMax value' do context 'when systemd version < 227' do...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/omnibus_helper_spec.rb
Ruby
apache-2.0
225
master
20,778
# frozen_string_literal: true require 'chef_helper' require 'time' RSpec.describe OmnibusHelper do cached(:chef_run) { converge_config } let(:node) { chef_run.node } let(:file) { double(:file, write: true) } subject { described_class.new(chef_run.node) } before do allow(Gitlab).to receive(:[]).and_cal...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/deprecations_spec.rb
Ruby
apache-2.0
225
master
14,079
require 'chef_helper' RSpec.describe Gitlab::Deprecations do let(:valid_config) { { gitlab: { nginx: { listen_addresses: "SomeRandomString" } } } } let(:invalid_config) do { "gitlab" => { "nginx" => { "listen_address" => "SomeRandomString" }, "gitlab-rails" => { ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/systemd_helper_spec.rb
Ruby
apache-2.0
225
master
907
require 'spec_helper' RSpec.describe SystemdHelper do describe '#systemd_version' do context 'when systemctl returns valid output' do before do valid_output = <<~OUTPUT systemd 242 (242) +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT OUTPUT allow(IO).to re...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/secrets_helper_spec.rb
Ruby
apache-2.0
225
master
13,871
require 'chef_helper' require 'base64' RSpec.describe 'secrets' do let(:newer_fips) { false } let(:chef_run) { ChefSpec::SoloRunner.new.converge('gitlab::default') } HEX_KEY = /\h{128}/.freeze ALPHANUMERIC_KEY = /\A[A-Za-z0-9]{32}\Z/m.freeze RSA_KEY = /\A-----BEGIN RSA PRIVATE KEY-----\n.+\n-----END RSA PRI...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/account_helper_spec.rb
Ruby
apache-2.0
225
master
545
require 'chef_helper' RSpec.describe AccountHelper do let(:chef_run) { ChefSpec::SoloRunner.converge('gitlab::default') } it 'returns a list of users' do expect(AccountHelper.new(chef_run.node).users).to eq( %w(git gitlab-www gitlab-redis gitlab-psql mattermost registry gitlab-prometheus gitlab-consul) ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/redis_uri_spec.rb
Ruby
apache-2.0
225
master
2,075
# This spec is to test the Redis helper and whether the values parsed # are the ones we expect require 'spec_helper' require_relative '../../../../../files/gitlab-cookbooks/package/libraries/helpers/redis_helper' RSpec.describe URI::Redis do subject { URI('redis://localhost') } it { is_expected.to be_a(described...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/storage_directory_helper_spec.rb
Ruby
apache-2.0
225
master
5,837
require 'chef_helper' RSpec.describe StorageDirectoryHelper do let(:success_shell) do shell = instance_double(Mixlib::ShellOut) allow(shell).to receive(:exitstatus).and_return(0) shell end let(:fail_shell) do shell = instance_double(Mixlib::ShellOut) allow(shell).to receive(:exitstatus).and_...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/services_helper_spec.rb
Ruby
apache-2.0
225
master
6,851
require 'chef_helper' RSpec.describe Services do let(:chef_run) { ChefSpec::SoloRunner.new } subject(:services) { described_class } describe '.enable_group' do before do chef_run.converge('gitlab::default') end it 'enables services in provide groups list' do expect do services....
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/certificate_helper_spec.rb
Ruby
apache-2.0
225
master
1,126
require 'spec_helper' require 'chef_helper' RSpec.describe CertificateHelper do subject(:mash) { described_class.new('/trust/', '/omni-cert/', '/user-dir/') } describe 'rehash' do shared_examples 'c_rehash fallback' do it 'falls back to c_rehash' do openssl_results = double(run_command: [], stdo...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/config_mash_spec.rb
Ruby
apache-2.0
225
master
1,907
require 'spec_helper' RSpec.describe Gitlab::ConfigMash do subject(:mash) { described_class.new } describe '.auto_vivify?' do subject { described_class } it 'returns true when inside auto_vivify block' do subject.auto_vivify do expect(subject.auto_vivify?).to be_truthy end end ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/settings_dsl_spec.rb
Ruby
apache-2.0
225
master
2,676
require 'chef_helper' RSpec.describe SettingsDSL::Utils do subject { described_class } describe '.service_name' do it 'returns hyphenated form of service name' do expect(subject.service_name('foo-bar')).to eq('foo-bar') expect(subject.service_name('foo_bar')).to eq('foo-bar') end end desc...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/gitlab_cluster_spec.rb
Ruby
apache-2.0
225
master
5,059
require 'spec_helper' RSpec.describe GitlabCluster, :cluster_config do let(:gitlab_cluster_config_path) { described_class::JSON_FILE } subject { described_class.config } describe '#all' do context 'when the cluster configuration file does not exist' do it 'returns an empty hash' do expect(subj...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/config/services_spec.rb
Ruby
apache-2.0
225
master
12,508
require 'chef_helper' RSpec.describe Services do before { allow(Gitlab).to receive(:[]).and_call_original } describe 'when using the gitlab cookbook' do let(:chef_run) { ChefSpec::SoloRunner.converge('gitlab::default') } it 'returns the gitlab service list' do chef_run expect(Services.service...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/config/gitlab_spec.rb
Ruby
apache-2.0
225
master
3,095
require 'chef_helper' RSpec.describe Gitlab do context 'when using an attribute_block' do it 'sets top level attributes to the provided root' do Gitlab.attribute_block('gitlab') do expect(Gitlab.attribute('test_attribute')[:parent]).to eq 'gitlab' end expect(Gitlab['test_attribute']).no...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/config/roles_spec.rb
Ruby
apache-2.0
225
master
4,585
require 'chef_helper' RSpec.describe 'GitLabRoles' do before do allow(Gitlab).to receive(:[]).and_call_original allow(Services).to receive(:enable_group).and_call_original end after do # Disable all roles after each test to clean the environment Gitlab.available_roles.each { |name, _value| Gitla...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/helpers/node_helper_spec.rb
Ruby
apache-2.0
225
master
1,087
# frozen_string_literal: true require 'chef_helper' RSpec.describe NodeHelper do let(:chef_run) { converge_config } subject { described_class } describe '.consume_cluster_attributes' do it 'merges new attributes into node as override level' do new_attrs = ::Gitlab::ConfigMash.new(geo_primary: true) ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/helpers/output_helper_spec.rb
Ruby
apache-2.0
225
master
1,408
require 'spec_helper' RSpec.describe OutputHelper do include OutputHelper describe "#quote" do context 'handling nil' do it 'should return nil' do expect(quote(nil)).to eq(nil) end end context 'handling numbers' do it 'should cooerce numbers to strings' do result = q...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/helpers/shell_out_helper_spec.rb
Ruby
apache-2.0
225
master
2,733
# frozen_string_literal: true require 'spec_helper' RSpec.describe ShellOutHelper do let(:dummy_class) { Class.new { extend ShellOutHelper } } before do allow(Mixlib::ShellOut).to receive(:new).and_call_original end describe '.do_shell_out' do context 'without optional arguments' do it 'creates...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/helpers/logging_helper_spec.rb
Ruby
apache-2.0
225
master
4,534
require 'chef_helper' RSpec.describe LoggingHelper do let(:log) { spy('Chef::Log') } before do subject.reset stub_const('Chef::Log', log) end context '.messages' do it 'starts with no messages' do expect(subject.messages).to eq([]) end end context '.log' do it 'records into .me...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/helpers/selinux_distro_helper_spec.rb
Ruby
apache-2.0
225
master
3,797
# frozen_string_literal: true require 'chef_helper' RSpec.describe SELinuxDistroHelper do context 'when the system is able to use selinux' do using RSpec::Parameterized::TableSyntax # Only test platforms we make guarantees against where(:platform, :platform_version, :is_supported) do 'redhat' | '2...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/helpers/selinux_helper_spec.rb
Ruby
apache-2.0
225
master
10,205
# frozen_string_literal: true require 'chef_helper' RSpec.describe SELinuxHelper do let(:chef_run) { converge_config } let(:node) { chef_run.node } context 'when getting GitLab shell file paths' do it 'returns a hash with all required file paths' do files = SELinuxHelper.gitlab_shell_files(node) ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/redis_helper/gitlab_rails_spec.rb
Ruby
apache-2.0
225
master
2,571
require 'chef_helper' RSpec.describe RedisHelper::GitlabRails do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(templatesymlink)).converge('gitlab::default') } subject { described_class.new(chef_run.node) } describe '#validate_instance_shard_config' do before { allow(Gitlab).to receive(:[]).and_ca...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/redis_helper/server_spec.rb
Ruby
apache-2.0
225
master
6,547
require 'chef_helper' RSpec.describe RedisHelper::Server do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(templatesymlink)).converge('gitlab::default') } subject { described_class.new(chef_run.node) } describe '#running_version' do let(:redis_cli_output) do <<~MSG # Server r...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/cookbooks/package/libraries/redis_helper/gitlab_workhorse_spec.rb
Ruby
apache-2.0
225
master
15,604
require 'chef_helper' RSpec.describe RedisHelper::GitlabWorkhorse do let(:chef_run) { ChefSpec::SoloRunner.new(step_into: %w(templatesymlink)).converge('gitlab::default') } let(:workhorse_redis_yml_template) { chef_run.template('/var/opt/gitlab/gitlab-rails/etc/redis.workhorse.yml') } let(:workhorse_redis_yml_fi...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/promotion_preflight_checks_spec.rb
Ruby
apache-2.0
225
master
622
require 'chef_helper' require 'geo/promotion_preflight_checks' RSpec.shared_context 'promotion-preflight-checks' do let(:command_name) { 'promotion-preflight-checks' } let(:klass) { Geo::PromotionPreflightChecks } let(:command_script) { 'promotion_preflight_checks' } end RSpec.describe 'gitlab-ctl promotion-pre...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/replicate_geo_database_spec.rb
Ruby
apache-2.0
225
master
5,258
require 'spec_helper' require 'omnibus-ctl' RSpec.describe 'gitlab-ctl replicate-geo-database' do subject { Omnibus::Ctl.new('testing-ctl') } let(:required_arguments) do %w(--host=gitlab-primary.geo --slot-name=gitlab_primary_geo) end before do allow_any_instance_of(Omnibus::Ctl).to receive(:r...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/geo_replication_spec.rb
Ruby
apache-2.0
225
master
1,690
require 'spec_helper' require 'omnibus-ctl' RSpec.describe 'gitlab-ctl geo-replication' do let(:toggle_command) { double(Geo::ReplicationToggleCommand) } subject { Omnibus::Ctl.new('testing-ctl') } before do allow_any_instance_of(Omnibus::Ctl).to receive(:require).and_call_original allow_any_instance_o...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/geo_spec.rb
Ruby
apache-2.0
225
master
2,251
# frozen_string_literal: true require 'spec_helper' require 'omnibus-ctl' require 'optparse' require_relative('../../../files/gitlab-ctl-commands/lib/gitlab_ctl') require_relative('../../../files/gitlab-ctl-commands-ee/lib/geo') RSpec.describe 'gitlab-ctl geo' do commands = %w(promote) command_lines = { 'pr...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/patroni_spec.rb
Ruby
apache-2.0
225
master
8,669
require 'spec_helper' require 'omnibus-ctl' require 'optparse' require_relative('../../../../files/gitlab-ctl-commands/lib/gitlab_ctl') require_relative('../../../../files/gitlab-ctl-commands-ee/lib/patroni') RSpec.describe 'Patroni' do core_commands = %w(bootstrap check-leader check-replica check-standby-leader re...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/consul_spec.rb
Ruby
apache-2.0
225
master
4,252
require 'spec_helper' require 'consul' require 'consul_download' RSpec.describe ConsulHandler do describe '#initialize' do it 'creates instance based on args' do instance = ConsulHandler.new([nil, nil, 'consul', 'kv', 'set'], 'rspec') expect(instance.command).to eq(ConsulHandler::Kv) expect(ins...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/pgbouncer_spec.rb
Ruby
apache-2.0
225
master
3,751
require 'spec_helper' $LOAD_PATH << File.join(__dir__, '../../../files/gitlab-ctl-commands-ee/lib') require 'pgbouncer' RSpec.describe Pgbouncer::Databases do let(:fake_ohai) do { 'gitlab' => { 'gitlab_rails' => { 'db_database' => 'fake_database', 'databases' => { ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/gitlab_ctl/postgresql/ee_spec.rb
Ruby
apache-2.0
225
master
3,213
require 'spec_helper' $LOAD_PATH << File.join(__dir__, '../../../../../../files/gitlab-ctl-commands/lib') $LOAD_PATH << File.join(__dir__, '../../../../../../files/gitlab-ctl-commands-ee/lib') require 'gitlab_ctl/util' require 'gitlab_ctl/postgresql/ee' RSpec.describe GitlabCtl::PostgreSQL::EE do describe "#get_pr...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/geo/promote_db_spec.rb
Ruby
apache-2.0
225
master
1,696
require 'spec_helper' require 'geo/promote_db' require 'gitlab_ctl/util' RSpec.describe Geo::PromoteDb, '#execute' do let(:instance) { double(base_path: '/opt/gitlab/embedded', data_path: 'ctl_data_path') } subject(:command) { described_class.new(instance) } before do allow($stdout).to receive(:puts) a...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/geo/replication_toggle_command_spec.rb
Ruby
apache-2.0
225
master
4,545
require 'spec_helper' $LOAD_PATH << './files/gitlab-ctl-commands-ee/lib' $LOAD_PATH << './files/gitlab-ctl-commands/lib' require 'geo/replication_toggle_command' require 'gitlab_ctl/util' RSpec.describe Geo::ReplicationToggleCommand do let(:status) { double('Command status', error?: false) } let(:arguments) { []...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/geo/promotion_preflight_checks_spec.rb
Ruby
apache-2.0
225
master
4,262
require 'spec_helper' require 'geo/promotion_preflight_checks' require 'gitlab_ctl/util' RSpec.describe Geo::PromotionPreflightChecks, '#execute' do let(:confirmation) { 'y' } let(:options) { { confirm_primary_is_down: true } } subject(:command) { described_class.new(nil, options) } before do allow(STDIN...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/geo/pitr_file_spec.rb
Ruby
apache-2.0
225
master
3,443
require 'spec_helper' require 'geo/pitr_file' RSpec.describe Geo::PitrFile do let(:lsn) { 'imafakelsn' } let(:postgres_path) { 'postgresql/dir' } let(:filepath) { "#{postgres_path}/data/geo-pitr-file" } let(:ctl_instance) { double('gitlab-ctl instance', base_path: '', data_path: 'ctl_data_path') } subject {...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/geo/replication_process_spec.rb
Ruby
apache-2.0
225
master
3,067
require 'spec_helper' $LOAD_PATH << './files/gitlab-ctl-commands-ee/lib' $LOAD_PATH << './files/gitlab-ctl-commands/lib' require 'geo/replication_process' require 'gitlab_ctl/util' RSpec.describe Geo::ReplicationProcess do let(:error_text) { 'AN ERROR' } let(:good_status) { double('Command status', error?: false...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/geo/promote_spec.rb
Ruby
apache-2.0
225
master
17,439
require 'spec_helper' require 'geo/promote' require 'geo/promote_db' require 'gitlab_ctl/util' require_relative('../../../../../files/gitlab-ctl-commands-ee/lib/patroni') RSpec.describe Geo::Promote, '#execute' do let(:base_path) { '/opt/gitlab/embedded' } let(:ctl) { double(base_path: base_path, data_path: '/var...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/chef/gitlab-ctl-commands-ee/lib/geo/replication_spec.rb
Ruby
apache-2.0
225
master
5,751
require 'spec_helper' $LOAD_PATH << './files/gitlab-ctl-commands-ee/lib' $LOAD_PATH << './files/gitlab-ctl-commands/lib' require 'geo/replication' require 'gitlab_ctl/util' RSpec.describe Geo::Replication, '#execute' do let(:command) { spy('command spy', error?: false) } let(:instance) { double(base_path: '/opt/...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/rubocop/cop/avoid_using_env_spec.rb
Ruby
apache-2.0
225
master
1,606
require 'spec_helper' require 'rubocop/rspec/cop_helper' require 'rubocop/rspec/expect_offense' require 'rubocop/cop/avoid_using_env' RSpec.describe Rubocop::Cop::AvoidUsingEnv do include CopHelper include RuboCop::RSpec::ExpectOffense subject(:cop) { described_class.new } it 'flags violation for setting en...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/rubocop/cop/specify_default_version_spec.rb
Ruby
apache-2.0
225
master
826
require 'spec_helper' require 'rubocop/rspec/cop_helper' require 'rubocop/rspec/expect_offense' require 'rubocop/cop/specify_default_version' RSpec.describe Rubocop::Cop::SpecifyDefaultVersion do include CopHelper include RuboCop::RSpec::ExpectOffense subject(:cop) { described_class.new } it 'flags violatio...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/build_spec.rb
Ruby
apache-2.0
225
master
579
require 'spec_helper' require 'gitlab/build' RSpec.describe Build do describe 'cmd' do describe 'by default' do it 'runs build command with log level info' do expect(described_class.cmd('gitlab')).to eq %w[bundle exec omnibus build gitlab --log-level info] end end describe 'with diff...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/linker_helper_spec.rb
Ruby
apache-2.0
225
master
611
require 'spec_helper' require 'gitlab/linker_helper' RSpec.describe LinkerHelper do subject(:service) { described_class } before do allow(IO).to receive(:popen).and_call_original allow(IO).to receive(:popen).with(%w[ldconfig -p]).and_return("1 library found\nlibssl.so (libc6,x86-64) => /lib64/libssl.so") ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/deployer_helper_spec.rb
Ruby
apache-2.0
225
master
1,885
require 'spec_helper' require 'gitlab/deployer_helper' RSpec.describe DeployerHelper do subject(:service) { described_class.new('some-token', 'some-env', 'some-branch') } describe '#trigger_deploy' do it 'triggers an auto deploy' do response = instance_double('response', body: JSON.dump(web_url: 'http://...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/package_repository_spec.rb
Ruby
apache-2.0
225
master
2,375
require 'spec_helper' require 'gitlab/package_repository' RSpec.describe PackageRepository do before do allow(ENV).to receive(:[]).and_call_original end describe '.new (factory method)' do context 'when REPOSITORY_TYPE is packagecloud' do before do stub_env_var('REPOSITORY_TYPE', 'packagec...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/gcloud_helper_spec.rb
Ruby
apache-2.0
225
master
1,801
require 'spec_helper' require 'gitlab/gcloud_helper' class StubGoogleCloudBucket def upload_file(source, destination); end def signed_url(path, version: :v4) "signed-#{path}" end end RSpec.describe GCloudHelper do before do allow(ENV).to receive(:[]).and_call_original allow(Build::Check).to recei...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/docker_helper_spec.rb
Ruby
apache-2.0
225
master
5,727
require 'spec_helper' require 'gitlab/docker_helper' RSpec.describe DockerHelper do describe '.authenticate' do before do stdin_mock = double(puts: true, close: true) stdout_mock = double(read: true) stderr_mock = double(read: true) wait_thr_mock = double(value: double(success?: true)) ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/util_spec.rb
Ruby
apache-2.0
225
master
1,440
require 'spec_helper' require 'gitlab/util' RSpec.describe Gitlab::Util do describe :get_env do it 'strips value of env variable correctly' do allow(ENV).to receive(:[]).with('foo').and_return(' bar ') expect(Gitlab::Util.get_env('foo')).to eq('bar') end it 'does not fail if env variable ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/version_spec.rb
Ruby
apache-2.0
225
master
11,342
require 'spec_helper' require 'gitlab/version' RSpec.describe Gitlab::Version do before do allow(ENV).to receive(:[]).and_call_original stub_env_var('GITLAB_ALTERNATIVE_REPO', nil) stub_env_var('ALTERNATIVE_PRIVATE_TOKEN', nil) end describe '.sources_channel' do subject { described_class } u...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/docker_operations_spec.rb
Ruby
apache-2.0
225
master
3,471
require 'spec_helper' require 'gitlab/docker_operations' RSpec.describe DockerOperations do describe '.set_timeout' do context 'when ENV["DOCKER_TIMEOUT"] is not set' do it 'uses a default timeout value' do expect(Docker).to receive(:options=).with({ read_timeout: 1200, write_timeout: 1200 }) ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/skopeo_helper_spec.rb
Ruby
apache-2.0
225
master
1,823
require 'spec_helper' require 'gitlab/skopeo_helper' RSpec.describe SkopeoHelper do before do allow(described_class).to receive(:system).and_return(true) end describe '.login' do it 'calls skopeo login command with correct arguments' do stdin_mock = double(puts: true, close: true) wait_thr_m...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/build_iteration_spec.rb
Ruby
apache-2.0
225
master
1,889
require 'spec_helper' require 'gitlab/build_iteration' RSpec.describe Gitlab::BuildIteration do describe :build_iteration do subject { Gitlab::BuildIteration.new } context 'when not on a tag' do before do allow(Build::Check).to receive(:on_tag?).and_return(false) end it 'returns 0...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/package_repository/pulp_repository_spec.rb
Ruby
apache-2.0
225
master
24,039
require 'spec_helper' require 'gitlab/package_repository/pulp_repository' RSpec.describe PackageRepository::PulpRepository do let(:repo) { described_class.new } before do allow(ENV).to receive(:[]).and_call_original # Prevent any real pulp command execution by default # Individual tests will override ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/package_repository/base_spec.rb
Ruby
apache-2.0
225
master
4,070
require 'spec_helper' require 'gitlab/package_repository/base' RSpec.describe PackageRepository::Base do let(:base_instance) { described_class.new } before do allow(ENV).to receive(:[]).and_call_original end describe 'abstract methods' do it 'raises NotImplementedError for #upload' do expect { ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/package_repository/package_type_spec.rb
Ruby
apache-2.0
225
master
9,244
require 'spec_helper' require 'gitlab/package_repository/base' require 'gitlab/package_repository/package_type' RSpec.describe PackageRepository::PulpRepository::PackageType do describe '#initialize' do it 'sets file_extension' do package_type = described_class.new('.test') expect(package_type.file_e...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/package_repository/package_cloud_repository_spec.rb
Ruby
apache-2.0
225
master
10,950
require 'spec_helper' require 'gitlab/package_repository/package_cloud_repository' RSpec.describe PackageRepository::PackageCloudRepository do let(:repo) { described_class.new } before do allow(ENV).to receive(:[]).and_call_original end describe '#target' do shared_examples 'with an override reposito...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/tasks/gitlab_com_spec.rb
Ruby
apache-2.0
225
master
2,157
require 'spec_helper' RSpec.describe 'gitlab_com', type: :rake do before(:all) do Rake.application.rake_require 'gitlab/tasks/gitlab_com' end describe 'gitlab_com:deployer' do before do Rake::Task['gitlab_com:deployer'].reenable allow(ENV).to receive(:[]).and_call_original stub_env_va...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/tasks/qa_spec.rb
Ruby
apache-2.0
225
master
4,931
require 'spec_helper' RSpec.describe 'qa', type: :rake do let(:gitlab_registry_image_address) { 'dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ce-qa' } let(:gitlab_version) { '10.2.0' } let(:commit_sha) { 'abcd1234' } let(:image_tag) { 'omnibus-12345' } let(:version_manifest) { { "software": { "gitlab-rai...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/tasks/aws_spec.rb
Ruby
apache-2.0
225
master
6,326
require 'spec_helper' Struct.new("Image", :image_id, :name, :tags) Struct.new("Region", :region_name) Struct.new("Response", :images) Struct.new("Tag", :key, :value) Struct.new("DescribeRegionResult", :regions) class AwsDummyClass # Dummy class which mimicks AWS::EC2::Client class from aws-sdk and stubs # necessa...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/tasks/docker_tasks_spec.rb
Ruby
apache-2.0
225
master
7,442
require 'spec_helper' RSpec.describe 'docker', type: :rake do before :all do Rake.application.rake_require 'gitlab/tasks/docker_tasks' end describe 'docker:build:image' do before do Rake::Task['docker:build:image'].reenable allow(ENV).to receive(:[]).and_call_original end it 'calls ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/tasks/license_spec.rb
Ruby
apache-2.0
225
master
4,756
require 'spec_helper' RSpec.describe 'license:check', type: :rake do let(:f) { double("Mocked file object") } before :all do Rake.application.rake_require 'gitlab/tasks/license' end before do Rake::Task['license:check'].reenable allow(File).to receive(:exist?).and_return(true) allow(File).to ...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/build/check_spec.rb
Ruby
apache-2.0
225
master
12,364
require 'spec_helper' require 'gitlab/build/check' RSpec.describe Build::Check do before do stub_default_package_version end describe 'is_ee?' do describe 'with environment variables' do before do stub_is_ee_version(false) end describe 'ee variable' do it 'when ee=true...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/build/image_spec.rb
Ruby
apache-2.0
225
master
7,716
require 'spec_helper' require 'gitlab/build/image' RSpec.describe Build::Image do ComponentImage = Class.new do extend Build::Image def self.gitlab_registry_image_name 'my-project/my-image' end def self.dockerhub_image_name 'my-image' end end before do allow(ENV).to receive...
github
gitlabhq/omnibus-gitlab
https://github.com/gitlabhq/omnibus-gitlab
spec/lib/gitlab/build/qa_spec.rb
Ruby
apache-2.0
225
master
1,717
require 'spec_helper' require 'gitlab/build/qa' RSpec.describe Build::QA do before do allow(ENV).to receive(:[]).and_call_original stub_env_var('GITLAB_ALTERNATIVE_REPO', nil) stub_env_var('ALTERNATIVE_PRIVATE_TOKEN', nil) end describe '.repo_path' do it 'returns correct location' do expec...