Merge branch 'tests'
This commit is contained in:
commit
8d9dd0d4e9
4 changed files with 355 additions and 0 deletions
15
debian/tests/control
vendored
15
debian/tests/control
vendored
|
@ -7,3 +7,18 @@ Depends: @, gem2deb-test-runner
|
|||
#Test-Command: ruby -r LIB -e "puts true"
|
||||
#Depends: @
|
||||
|
||||
Tests: setup
|
||||
Depends: @,
|
||||
sudo,
|
||||
ruby-factory-girl-rails,
|
||||
ruby-rspec-rails,
|
||||
ruby-rspec-retry,
|
||||
ruby-capybara,
|
||||
#ruby-poltergeist,
|
||||
#ruby-capybara-screenshot,
|
||||
ruby-database-cleaner,
|
||||
#ruby-email-spec,
|
||||
#ruby-ffaker,
|
||||
ruby-json-schema,
|
||||
phantomjs
|
||||
Restrictions: needs-recommends
|
||||
|
|
40
debian/tests/setup
vendored
Executable file
40
debian/tests/setup
vendored
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$ADTTMP" ]; then
|
||||
ADTTMP=$(mktemp -d)
|
||||
cleanup() {
|
||||
rm -rf "$ADTTMP"
|
||||
}
|
||||
trap cleanup INT TERM EXIT
|
||||
fi
|
||||
|
||||
cd $ADTTMP
|
||||
|
||||
exec 2>&1
|
||||
set -ex
|
||||
|
||||
cd /usr/share/gitlab
|
||||
sudo truncate -s 0 Gemfile.lock
|
||||
if ! grep factory_girl_rails Gemfile >/dev/null; then
|
||||
cp Gemfile ${ADTTMP}
|
||||
cat <<EOF >> ${ADTTMP}/Gemfile
|
||||
gem 'factory_girl_rails', '~> 4.6'
|
||||
gem 'rspec-rails', '~> 3.4'
|
||||
gem 'rspec-retry', '~> 0.4.3'
|
||||
gem 'capybara', '~> 2.5'
|
||||
gem 'poltergeist', '~> 1.9'
|
||||
gem 'capybara-screenshot', '~> 1.0'
|
||||
gem 'database_cleaner', '~> 1.5'
|
||||
gem 'email_spec', '~> 1.6'
|
||||
gem 'ffaker', '~> 2.0'
|
||||
gem 'json-schema', '~> 2.6', '>= 2.6.2'
|
||||
EOF
|
||||
sudo cp ${ADTTMP}/Gemfile .
|
||||
fi
|
||||
|
||||
export $(cat /etc/gitlab/gitlab-debian.conf)
|
||||
sudo -u gitlab -E -H bundle install --local
|
||||
sudo -u gitlab -E -H bundle exec rspec spec/uploaders spec/routing spec/views \
|
||||
spec/factories_spec.rb spec/finders
|
||||
|
||||
#config 2/2 failed, controllers many failed
|
233
debian/tests/todo/helpers
vendored
Normal file
233
debian/tests/todo/helpers
vendored
Normal file
|
@ -0,0 +1,233 @@
|
|||
$ DB=postgres sudo -u gitlab -E -H bundle exec rspec spec/helpers/
|
||||
Error deleting useless .secret file: Permission denied @ unlink_internal - /usr/share/gitlab/.secret
|
||||
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
|
||||
Please register a mime type using `register_mime_type` then
|
||||
use `register_compressor` or `register_transformer`.
|
||||
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
|
||||
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:57)
|
||||
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
|
||||
Please register a mime type using `register_mime_type` then
|
||||
use `register_compressor` or `register_transformer`.
|
||||
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
|
||||
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:58)
|
||||
......FF....................................................................................................F...............................................................................................................F.FF.FF.FF.......................FF.......................................................
|
||||
|
||||
Failures:
|
||||
|
||||
1) ApplicationHelper project_icon returns an url for the avatar
|
||||
Failure/Error:
|
||||
expect(helper.project_icon("#{project.namespace.to_param}/#{project.to_param}").to_s).
|
||||
to eq "<img src=\"#{avatar_url}\" alt=\"Banana sample\" />"
|
||||
|
||||
expected: "<img src=\"http://localhost/uploads/project/avatar/1/banana_sample.gif\" alt=\"Banana sample\" />"
|
||||
got: "<img src=\"http://nishumbha/uploads/project/avatar/1/banana_sample.gif\" alt=\"Banana sample\" />"
|
||||
|
||||
(compared using ==)
|
||||
# ./spec/helpers/application_helper_spec.rb:61:in `block (3 levels) in <top (required)>'
|
||||
|
||||
2) ApplicationHelper project_icon gives uploaded icon when present
|
||||
Failure/Error:
|
||||
expect(helper.project_icon("#{project.namespace.to_param}/#{project.to_param}").to_s).to match(
|
||||
image_tag(avatar_url))
|
||||
|
||||
expected "<img src=\"http://nishumbha/namespace2/gitlabhq/avatar\" alt=\"Avatar\" />" to match "<img src=\"http://localhost/namespace2/gitlabhq/avatar\" alt=\"Avatar\" />"
|
||||
# ./spec/helpers/application_helper_spec.rb:71:in `block (3 levels) in <top (required)>'
|
||||
|
||||
3) GitlabMarkdownHelper#link_to_gfm replaces commit message with emoji to link
|
||||
Failure/Error:
|
||||
expect(actual).
|
||||
to eq %Q(<img class="emoji" title=":book:" alt=":book:" src="http://localhost/assets/1F4D6.png" height="20" width="20" align="absmiddle"><a href="/foo">Book</a>)
|
||||
|
||||
expected: "<img class=\"emoji\" title=\":book:\" alt=\":book:\" src=\"http://localhost/assets/1F4D6.png\" height=\"20\" width=\"20\" align=\"absmiddle\"><a href=\"/foo\">Book</a>"
|
||||
got: "<img class=\"emoji\" title=\":book:\" alt=\":book:\" src=\"http://nishumbha/assets/1F4D6-9d912a9d1bb10dc7f2645b345ed09e90461e83df0de275acb806f1f75cef1fcf.png\" height=\"20\" width=\"20\" align=\"absmiddle\"><a href=\"/foo\">Book</a>"
|
||||
|
||||
(compared using ==)
|
||||
# ./spec/helpers/gitlab_markdown_helper_spec.rb:115:in `block (3 levels) in <top (required)>'
|
||||
|
||||
4) PageLayoutHelper page_image defaults to the GitLab logo
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:45:in `block (3 levels) in <top (required)>'
|
||||
|
||||
5) PageLayoutHelper page_image with @project assigned falls back to the default when avatar_url is nil
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
|
||||
|
||||
6) PageLayoutHelper page_image with no assignments falls back to the default
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
|
||||
|
||||
7) PageLayoutHelper page_image with @user assigned falls back to the default when avatar_url is nil
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
|
||||
|
||||
8) PageLayoutHelper page_image with no assignments falls back to the default
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
|
||||
|
||||
9) PageLayoutHelper page_image with @group assigned falls back to the default when avatar_url is nil
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
|
||||
|
||||
10) PageLayoutHelper page_image with no assignments falls back to the default
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
|
||||
|
||||
11) ProjectsHelper#license_short_name when project.repository has a license_key returns the nickname of the license if present
|
||||
Failure/Error: license.nickname || license.name
|
||||
|
||||
Licensee::InvalidLicense:
|
||||
'agpl-3.0' is not a valid license key
|
||||
# ./app/helpers/projects_helper.rb:116:in `license_short_name'
|
||||
# ./spec/helpers/projects_helper_spec.rb:106:in `block (4 levels) in <top (required)>'
|
||||
|
||||
12) ProjectsHelper#license_short_name when project.repository has a license_key returns the name of the license if nickname is not present
|
||||
Failure/Error: license.nickname || license.name
|
||||
|
||||
Licensee::InvalidLicense:
|
||||
'mit' is not a valid license key
|
||||
# ./app/helpers/projects_helper.rb:116:in `license_short_name'
|
||||
# ./spec/helpers/projects_helper_spec.rb:112:in `block (4 levels) in <top (required)>'
|
||||
|
||||
Finished in 1 minute 41.2 seconds (files took 9.4 seconds to load)
|
||||
310 examples, 12 failures
|
||||
|
||||
Failed examples:
|
||||
|
||||
rspec ./spec/helpers/application_helper_spec.rb:57 # ApplicationHelper project_icon returns an url for the avatar
|
||||
rspec ./spec/helpers/application_helper_spec.rb:65 # ApplicationHelper project_icon gives uploaded icon when present
|
||||
rspec ./spec/helpers/gitlab_markdown_helper_spec.rb:113 # GitlabMarkdownHelper#link_to_gfm replaces commit message with emoji to link
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb:44 # PageLayoutHelper page_image defaults to the GitLab logo
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:2:2] # PageLayoutHelper page_image with @project assigned falls back to the default when avatar_url is nil
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:3:1] # PageLayoutHelper page_image with no assignments falls back to the default
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:4:2] # PageLayoutHelper page_image with @user assigned falls back to the default when avatar_url is nil
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:5:1] # PageLayoutHelper page_image with no assignments falls back to the default
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:6:2] # PageLayoutHelper page_image with @group assigned falls back to the default when avatar_url is nil
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:7:1] # PageLayoutHelper page_image with no assignments falls back to the default
|
||||
rspec ./spec/helpers/projects_helper_spec.rb:103 # ProjectsHelper#license_short_name when project.repository has a license_key returns the nickname of the license if present
|
||||
rspec ./spec/helpers/projects_helper_spec.rb:109 # ProjectsHelper#license_short_name when project.repository has a license_key returns the name of the license if nickname is not present
|
||||
|
||||
pravi@nishumbha:/usr/share/gitlab$
|
||||
$ DB=postgres sudo -u gitlab -E -H bundle exec rspec spec/helpers/
|
||||
Error deleting useless .secret file: Permission denied @ unlink_internal - /usr/share/gitlab/.secret
|
||||
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
|
||||
Please register a mime type using `register_mime_type` then
|
||||
use `register_compressor` or `register_transformer`.
|
||||
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
|
||||
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:57)
|
||||
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
|
||||
Please register a mime type using `register_mime_type` then
|
||||
use `register_compressor` or `register_transformer`.
|
||||
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
|
||||
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:58)
|
||||
......FF....................................................................................................F...............................................................................................................F.FF.FF.FF.......................FF.......................................................
|
||||
|
||||
Failures:
|
||||
|
||||
1) ApplicationHelper project_icon returns an url for the avatar
|
||||
Failure/Error:
|
||||
expect(helper.project_icon("#{project.namespace.to_param}/#{project.to_param}").to_s).
|
||||
to eq "<img src=\"#{avatar_url}\" alt=\"Banana sample\" />"
|
||||
|
||||
expected: "<img src=\"http://localhost/uploads/project/avatar/1/banana_sample.gif\" alt=\"Banana sample\" />"
|
||||
got: "<img src=\"http://nishumbha/uploads/project/avatar/1/banana_sample.gif\" alt=\"Banana sample\" />"
|
||||
|
||||
(compared using ==)
|
||||
# ./spec/helpers/application_helper_spec.rb:61:in `block (3 levels) in <top (required)>'
|
||||
|
||||
2) ApplicationHelper project_icon gives uploaded icon when present
|
||||
Failure/Error:
|
||||
expect(helper.project_icon("#{project.namespace.to_param}/#{project.to_param}").to_s).to match(
|
||||
image_tag(avatar_url))
|
||||
|
||||
expected "<img src=\"http://nishumbha/namespace2/gitlabhq/avatar\" alt=\"Avatar\" />" to match "<img src=\"http://localhost/namespace2/gitlabhq/avatar\" alt=\"Avatar\" />"
|
||||
# ./spec/helpers/application_helper_spec.rb:71:in `block (3 levels) in <top (required)>'
|
||||
|
||||
3) GitlabMarkdownHelper#link_to_gfm replaces commit message with emoji to link
|
||||
Failure/Error:
|
||||
expect(actual).
|
||||
to eq %Q(<img class="emoji" title=":book:" alt=":book:" src="http://localhost/assets/1F4D6.png" height="20" width="20" align="absmiddle"><a href="/foo">Book</a>)
|
||||
|
||||
expected: "<img class=\"emoji\" title=\":book:\" alt=\":book:\" src=\"http://localhost/assets/1F4D6.png\" height=\"20\" width=\"20\" align=\"absmiddle\"><a href=\"/foo\">Book</a>"
|
||||
got: "<img class=\"emoji\" title=\":book:\" alt=\":book:\" src=\"http://nishumbha/assets/1F4D6-9d912a9d1bb10dc7f2645b345ed09e90461e83df0de275acb806f1f75cef1fcf.png\" height=\"20\" width=\"20\" align=\"absmiddle\"><a href=\"/foo\">Book</a>"
|
||||
|
||||
(compared using ==)
|
||||
# ./spec/helpers/gitlab_markdown_helper_spec.rb:115:in `block (3 levels) in <top (required)>'
|
||||
|
||||
4) PageLayoutHelper page_image defaults to the GitLab logo
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:45:in `block (3 levels) in <top (required)>'
|
||||
|
||||
5) PageLayoutHelper page_image with @project assigned falls back to the default when avatar_url is nil
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
|
||||
|
||||
6) PageLayoutHelper page_image with no assignments falls back to the default
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
|
||||
|
||||
7) PageLayoutHelper page_image with @user assigned falls back to the default when avatar_url is nil
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
|
||||
|
||||
8) PageLayoutHelper page_image with no assignments falls back to the default
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
|
||||
|
||||
9) PageLayoutHelper page_image with @group assigned falls back to the default when avatar_url is nil
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:61:in `block (5 levels) in <top (required)>'
|
||||
|
||||
10) PageLayoutHelper page_image with no assignments falls back to the default
|
||||
Failure/Error: expect(helper.page_image).to end_with 'assets/gitlab_logo.png'
|
||||
expected "http://test.host/assets/gitlab_logo-7ae504fe4f68fdebb3c2034e36621930cd36ea87924c11ff65dbcb8ed50dca58.png" to end with "assets/gitlab_logo.png"
|
||||
# ./spec/helpers/page_layout_helper_spec.rb:67:in `block (5 levels) in <top (required)>'
|
||||
|
||||
11) ProjectsHelper#license_short_name when project.repository has a license_key returns the nickname of the license if present
|
||||
Failure/Error: license.nickname || license.name
|
||||
|
||||
Licensee::InvalidLicense:
|
||||
'agpl-3.0' is not a valid license key
|
||||
# ./app/helpers/projects_helper.rb:116:in `license_short_name'
|
||||
# ./spec/helpers/projects_helper_spec.rb:106:in `block (4 levels) in <top (required)>'
|
||||
|
||||
12) ProjectsHelper#license_short_name when project.repository has a license_key returns the name of the license if nickname is not present
|
||||
Failure/Error: license.nickname || license.name
|
||||
|
||||
Licensee::InvalidLicense:
|
||||
'mit' is not a valid license key
|
||||
# ./app/helpers/projects_helper.rb:116:in `license_short_name'
|
||||
# ./spec/helpers/projects_helper_spec.rb:112:in `block (4 levels) in <top (required)>'
|
||||
|
||||
Finished in 1 minute 41.2 seconds (files took 9.4 seconds to load)
|
||||
310 examples, 12 failures
|
||||
|
||||
Failed examples:
|
||||
|
||||
rspec ./spec/helpers/application_helper_spec.rb:57 # ApplicationHelper project_icon returns an url for the avatar
|
||||
rspec ./spec/helpers/application_helper_spec.rb:65 # ApplicationHelper project_icon gives uploaded icon when present
|
||||
rspec ./spec/helpers/gitlab_markdown_helper_spec.rb:113 # GitlabMarkdownHelper#link_to_gfm replaces commit message with emoji to link
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb:44 # PageLayoutHelper page_image defaults to the GitLab logo
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:2:2] # PageLayoutHelper page_image with @project assigned falls back to the default when avatar_url is nil
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:3:1] # PageLayoutHelper page_image with no assignments falls back to the default
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:4:2] # PageLayoutHelper page_image with @user assigned falls back to the default when avatar_url is nil
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:5:1] # PageLayoutHelper page_image with no assignments falls back to the default
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:6:2] # PageLayoutHelper page_image with @group assigned falls back to the default when avatar_url is nil
|
||||
rspec ./spec/helpers/page_layout_helper_spec.rb[1:2:7:1] # PageLayoutHelper page_image with no assignments falls back to the default
|
||||
rspec ./spec/helpers/projects_helper_spec.rb:103 # ProjectsHelper#license_short_name when project.repository has a license_key returns the nickname of the license if present
|
||||
rspec ./spec/helpers/projects_helper_spec.rb:109 # ProjectsHelper#license_short_name when project.repository has a license_key returns the name of the license if nickname is not present
|
||||
|
||||
pravi@nishumbha:/usr/share/gitlab$
|
||||
|
67
debian/tests/todo/initializers
vendored
Normal file
67
debian/tests/todo/initializers
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
$ DB=postgres sudo -u gitlab -E -H bundle exec rspec spec/initializers/
|
||||
6_validations_spec.rb settings_spec.rb
|
||||
secret_token_spec.rb trusted_proxies_spec.rb
|
||||
pravi@nishumbha:/usr/share/gitlab$ DB=postgres sudo -u gitlab -E -H bundle exec rspec spec/initializers/
|
||||
[sudo] password for pravi:
|
||||
Error deleting useless .secret file: Permission denied @ unlink_internal - /usr/share/gitlab/.secret
|
||||
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
|
||||
Please register a mime type using `register_mime_type` then
|
||||
use `register_compressor` or `register_transformer`.
|
||||
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
|
||||
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:57)
|
||||
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
|
||||
Please register a mime type using `register_mime_type` then
|
||||
use `register_compressor` or `register_transformer`.
|
||||
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
|
||||
(called from block (2 levels) in <class:Railtie> at /usr/lib/ruby/vendor_ruby/sass/rails/railtie.rb:58)
|
||||
Error deleting useless .secret file: Permission denied @ unlink_internal - /usr/share/gitlab/.secret
|
||||
..............F....FF.........
|
||||
|
||||
Failures:
|
||||
|
||||
1) create_tokens setting secret_key_base and otp_key_base when the other secrets all exist when secret_key_base and otp_key_base do not exist uses the file secret
|
||||
Failure/Error: expect(new_secrets['db_key_base']).to eq('db_key_base')
|
||||
|
||||
expected: "db_key_base"
|
||||
got: nil
|
||||
|
||||
(compared using ==)
|
||||
# ./spec/initializers/secret_token_spec.rb:136:in `block (6 levels) in <top (required)>'
|
||||
# ./config/initializers/secret_token.rb:84:in `write_secrets_yml'
|
||||
# ./config/initializers/secret_token.rb:31:in `create_tokens'
|
||||
# ./spec/initializers/secret_token_spec.rb:139:in `block (5 levels) in <top (required)>'
|
||||
|
||||
2) create_tokens setting secret_key_base and otp_key_base when db_key_base is blank but exists in secrets.yml warns about the blank value existing in secrets.yml and exits
|
||||
Failure/Error:
|
||||
expect(self).to receive(:warn) do |warning|
|
||||
expect(warning).to include('db_key_base')
|
||||
expect(warning).to include('<%= an_erb_expression %>')
|
||||
end
|
||||
|
||||
(#<RSpec::ExampleGroups::CreateTokens::SettingSecretKeyBaseAndOtpKeyBase::WhenDbKeyBaseIsBlankButExistsInSecretsYml:0x0000000ebe43b8>).warn(*(any args))
|
||||
expected: 1 time with any arguments
|
||||
received: 0 times with any arguments
|
||||
# ./spec/initializers/secret_token_spec.rb:184:in `block (4 levels) in <top (required)>'
|
||||
|
||||
3) create_tokens setting secret_key_base and otp_key_base when db_key_base is blank but exists in secrets.yml does not update secrets.yml
|
||||
Failure/Error: expect { create_tokens }.to raise_error(SystemExit)
|
||||
|
||||
expected SystemExit, got #<RSpec::Mocks::MockExpectationError: (File (class)).write("config/secrets.yml", "---\ntest:\n otp_key_base: otp_key_base\n secret_key_base: secret_key_base\n db_key_base: \"<%= an_erb_expression %>\"\nproduction:\n db_key_base: c0ee30ba71733e9d3524f8ab03e0018524bc7a67cb5fce8847b3071758c333de28cd847b2fc7f9a476ddbf92ce52c2d38015e1e91a1ae272fc08c4198035d2e4\n", {:mode=>"w", :perm=>384})
|
||||
expected: 0 times with any arguments
|
||||
received: 1 time with arguments: ("config/secrets.yml", "---\ntest:\n otp_key_base: otp_key_base\n secret_key_base: secret_key_base\n db_key_base: \"<%= an_erb_expression %>\"\nproduction:\n db_key_base: c0ee30ba71733e9d3524f8ab03e0018524bc7a67cb5fce8847b3071758c333de28cd847b2fc7f9a476ddbf92ce52c2d38015e1e91a1ae272fc08c4198035d2e4\n", {:mode=>"w", :perm=>384})> with backtrace:
|
||||
# ./config/initializers/secret_token.rb:84:in `write_secrets_yml'
|
||||
# ./config/initializers/secret_token.rb:31:in `create_tokens'
|
||||
# ./spec/initializers/secret_token_spec.rb:196:in `block (5 levels) in <top (required)>'
|
||||
# ./spec/initializers/secret_token_spec.rb:196:in `block (4 levels) in <top (required)>'
|
||||
# ./spec/initializers/secret_token_spec.rb:196:in `block (4 levels) in <top (required)>'
|
||||
|
||||
Finished in 23.38 seconds (files took 8.94 seconds to load)
|
||||
30 examples, 3 failures
|
||||
|
||||
Failed examples:
|
||||
|
||||
rspec ./spec/initializers/secret_token_spec.rb:130 # create_tokens setting secret_key_base and otp_key_base when the other secrets all exist when secret_key_base and otp_key_base do not exist uses the file secret
|
||||
rspec ./spec/initializers/secret_token_spec.rb:183 # create_tokens setting secret_key_base and otp_key_base when db_key_base is blank but exists in secrets.yml warns about the blank value existing in secrets.yml and exits
|
||||
rspec ./spec/initializers/secret_token_spec.rb:192 # create_tokens setting secret_key_base and otp_key_base when db_key_base is blank but exists in secrets.yml does not update secrets.yml
|
||||
|
||||
|
Loading…
Reference in a new issue