Skip to content
Snippets Groups Projects
Commit 3e9138e0 authored by GitLab Bot's avatar GitLab Bot
Browse files

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-09-10

# Conflicts:
#	LICENSE

[ci skip]
parents 3c7e94f4 2f990e34
No related branches found
No related tags found
No related merge requests found
The GitLab Enterprise Edition (EE) license (the “EE License”)
Copyright (c) 2011-2018 GitLab B.V.
 
<<<<<<< HEAD
With regard to the GitLab Software:
 
This software and associated documentation files (the "Software") may only be
Loading
Loading
@@ -31,14 +32,31 @@ client-side JavaScript, in whole or in part, is copyrighted under the MIT Expat
license. The full text of this EE License shall be included in all copies or
substantial portions of the Software.
 
=======
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
>>>>>>> upstream/master
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
<<<<<<< HEAD
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
 
For all third party components incorporated into the GitLab Software, those
components are licensed under the original license provided by the owner of the
applicable component.
=======
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
>>>>>>> upstream/master
Loading
Loading
@@ -3,8 +3,10 @@ import progressBar from '@gitlab-org/gitlab-ui/dist/components/base/progress_bar
import modal from '@gitlab-org/gitlab-ui/dist/components/base/modal';
 
import dModal from '@gitlab-org/gitlab-ui/dist/directives/modal';
import dTooltip from '@gitlab-org/gitlab-ui/dist/directives/tooltip';
 
Vue.component('gl-progress-bar', progressBar);
Vue.component('gl-ui-modal', modal);
 
Vue.directive('gl-modal', dModal);
Vue.directive('gl-tooltip', dTooltip);
<script>
import { mapActions } from 'vuex';
import Icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip';
import { pluralize, truncate } from '~/lib/utils/text_utility';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
import { COUNT_OF_AVATARS_IN_GUTTER, LENGTH_OF_AVATAR_TOOLTIP } from '../constants';
 
export default {
directives: {
tooltip,
},
components: {
Icon,
UserAvatarImage,
Loading
Loading
@@ -91,10 +87,10 @@ export default {
@click.native="toggleDiscussions"
/>
<span
v-tooltip
v-gl-tooltip
v-if="moreText"
:title="moreText"
class="diff-comments-more-count has-tooltip js-diff-comment-avatar js-diff-comment-plus"
class="diff-comments-more-count js-diff-comment-avatar js-diff-comment-plus"
data-container="body"
data-placement="top"
role="button"
Loading
Loading
Loading
Loading
@@ -13,6 +13,10 @@ def fake_application_settings(attributes = {})
Gitlab::FakeApplicationSettings.new(::ApplicationSetting.defaults.merge(attributes || {}))
end
 
def clear_in_memory_application_settings!
@in_memory_application_settings = nil
end
def method_missing(name, *args, &block)
current_application_settings.send(name, *args, &block) # rubocop:disable GitlabSecurity/PublicSend
end
Loading
Loading
Loading
Loading
@@ -11,6 +11,10 @@ def initialize(options = {})
FakeApplicationSettings.define_predicate_methods(options)
end
 
def pick_repository_storage
repository_storages.sample
end
# Mimic ActiveRecord predicate methods for boolean values
def self.define_predicate_methods(options)
options.each do |key, value|
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@
},
"dependencies": {
"@gitlab-org/gitlab-svgs": "^1.29.0",
"@gitlab-org/gitlab-ui": "^1.1.0",
"@gitlab-org/gitlab-ui": "^1.2.0",
"autosize": "^4.0.0",
"axios": "^0.17.1",
"babel-core": "^6.26.3",
Loading
Loading
Loading
Loading
@@ -78,13 +78,7 @@ If your user doesn't have permission to default sandbox group
GITLAB_USERNAME=jsmith GITLAB_PASSWORD=password GITLAB_SANDBOX_NAME=jsmith-qa-sandbox bin/qa Test::Instance::All https://gitlab.example.com
```
 
In addition, the `GITLAB_USER_TYPE` can be set to "ldap" to sign in as an LDAP user:
```
GITLAB_USER_TYPE=ldap GITLAB_USERNAME=jsmith GITLAB_PASSWORD=password GITLAB_SANDBOX_NAME=jsmith-qa-sandbox bin/qa Test::Instance::All https://gitlab.example.com
```
All [supported environment variables are here](https://gitlab.com/gitlab-org/gitlab-qa#supported-environment-variables).
All [supported environment variables are here](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/what_tests_can_be_run.md#supported-environment-variables).
 
### Building a Docker image to test
 
Loading
Loading
Loading
Loading
@@ -59,6 +59,19 @@ def sign_in_using_credentials(user = nil)
Page::Menu::Main.act { has_personal_area? }
end
 
def sign_in_using_admin_credentials
admin = QA::Factory::Resource::User.new.tap do |user|
user.username = QA::Runtime::User.admin_username
user.password = QA::Runtime::User.admin_password
end
using_wait_time 0 do
sign_in_using_gitlab_credentials(admin)
end
Page::Menu::Main.act { has_personal_area? }
end
def self.path
'/users/sign_in'
end
Loading
Loading
Loading
Loading
@@ -5,8 +5,6 @@ module Env
 
extend self
 
attr_writer :user_type
# set to 'false' to have Chrome run visibly instead of headless
def chrome_headless?
(ENV['CHROME_HEADLESS'] =~ /^(false|no|0)$/i) != 0
Loading
Loading
@@ -21,18 +19,6 @@ def personal_access_token
ENV['PERSONAL_ACCESS_TOKEN']
end
 
# By default, "standard" denotes a standard GitLab user login.
# Set this to "ldap" if the user should be logged in via LDAP.
def user_type
return @user_type if defined?(@user_type) # rubocop:disable Gitlab/ModuleWithInstanceVariables
ENV.fetch('GITLAB_USER_TYPE', 'standard').tap do |type|
unless %w(ldap standard).include?(type)
raise ArgumentError.new("Invalid user type '#{type}': must be 'ldap' or 'standard'")
end
end
end
def user_username
ENV['GITLAB_USERNAME']
end
Loading
Loading
@@ -41,6 +27,14 @@ def user_password
ENV['GITLAB_PASSWORD']
end
 
def admin_username
ENV['GITLAB_ADMIN_USERNAME']
end
def admin_password
ENV['GITLAB_ADMIN_PASSWORD']
end
def forker?
forker_username && forker_password
end
Loading
Loading
Loading
Loading
@@ -7,25 +7,37 @@ def default_username
'root'
end
 
def default_password
'5iveL!fe'
end
def username
Runtime::Env.user_username || default_username
end
 
def password
Runtime::Env.user_password || '5iveL!fe'
Runtime::Env.user_password || default_password
end
 
def ldap_user?
Runtime::Env.user_type == 'ldap'
Runtime::Env.ldap_username && Runtime::Env.ldap_password
end
 
def ldap_username
Runtime::Env.ldap_username || name
Runtime::Env.ldap_username || username
end
 
def ldap_password
Runtime::Env.ldap_password || password
end
def admin_username
Runtime::Env.admin_username || default_username
end
def admin_password
Runtime::Env.admin_password || default_password
end
end
end
end
Loading
Loading
@@ -3,10 +3,6 @@
module QA
context :manage, :orchestrated, :ldap do
describe 'LDAP login' do
before do
Runtime::Env.user_type = 'ldap'
end
it 'user logs into GitLab using LDAP credentials' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials }
Loading
Loading
Loading
Loading
@@ -56,27 +56,6 @@
end
end
 
describe '.user_type' do
it 'returns standard if not defined' do
expect(described_class.user_type).to eq('standard')
end
it 'returns standard as defined' do
stub_env('GITLAB_USER_TYPE', 'standard')
expect(described_class.user_type).to eq('standard')
end
it 'returns ldap as defined' do
stub_env('GITLAB_USER_TYPE', 'ldap')
expect(described_class.user_type).to eq('ldap')
end
it 'returns an error if invalid user type' do
stub_env('GITLAB_USER_TYPE', 'foobar')
expect { described_class.user_type }.to raise_error(ArgumentError)
end
end
describe '.forker?' do
it 'returns false if no forker credentials are defined' do
expect(described_class).not_to be_forker
Loading
Loading
Loading
Loading
@@ -137,6 +137,10 @@
Fog.unmock! if Fog.mock?
end
 
config.after(:example) do
Gitlab::CurrentSettings.clear_in_memory_application_settings!
end
config.before(:example, :mailer) do
reset_delivered_emails!
end
Loading
Loading
Loading
Loading
@@ -82,9 +82,9 @@
version "1.29.0"
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-svgs/-/gitlab-svgs-1.29.0.tgz#03b65b513f9099bbda6ecf94d673a2952f8c6c70"
 
"@gitlab-org/gitlab-ui@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-ui/-/gitlab-ui-1.1.0.tgz#4216b84c142e37653666da6a088384a44c9d5727"
"@gitlab-org/gitlab-ui@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-ui/-/gitlab-ui-1.2.0.tgz#1d9bf067c2ccf70bcc8e8150644dac475106f3c8"
dependencies:
"@gitlab-org/gitlab-svgs" "^1.23.0"
bootstrap-vue "^2.0.0-rc.11"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment