Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
07e23c70
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
07e23c70
编写于
9月 06, 2020
作者:
G
GitLab Bot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add latest changes from gitlab-org/gitlab@master
上级
ef171920
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
6 deletion
+11
-6
changelogs/unreleased/app-logger-17.yml
changelogs/unreleased/app-logger-17.yml
+5
-0
lib/gitlab/auth/ldap/config.rb
lib/gitlab/auth/ldap/config.rb
+2
-2
lib/gitlab/repository_cache_adapter.rb
lib/gitlab/repository_cache_adapter.rb
+1
-1
spec/lib/gitlab/auth/ldap/config_spec.rb
spec/lib/gitlab/auth/ldap/config_spec.rb
+2
-2
spec/lib/gitlab/repository_cache_adapter_spec.rb
spec/lib/gitlab/repository_cache_adapter_spec.rb
+1
-1
未找到文件。
changelogs/unreleased/app-logger-17.yml
0 → 100644
浏览文件 @
07e23c70
---
title
:
Use GitLab AppLogger
merge_request
:
41261
author
:
Rajendra Kadam
type
:
other
lib/gitlab/auth/ldap/config.rb
浏览文件 @
07e23c70
...
...
@@ -248,7 +248,7 @@ module Gitlab
begin
custom_options
[
:cert
]
=
OpenSSL
::
X509
::
Certificate
.
new
(
custom_options
[
:cert
])
rescue
OpenSSL
::
X509
::
CertificateError
=>
e
Rails
.
logger
.
error
"LDAP TLS Options 'cert' is invalid for provider
#{
provider
}
:
#{
e
.
message
}
"
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
error
"LDAP TLS Options 'cert' is invalid for provider
#{
provider
}
:
#{
e
.
message
}
"
end
end
...
...
@@ -256,7 +256,7 @@ module Gitlab
begin
custom_options
[
:key
]
=
OpenSSL
::
PKey
.
read
(
custom_options
[
:key
])
rescue
OpenSSL
::
PKey
::
PKeyError
=>
e
Rails
.
logger
.
error
"LDAP TLS Options 'key' is invalid for provider
#{
provider
}
:
#{
e
.
message
}
"
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
error
"LDAP TLS Options 'key' is invalid for provider
#{
provider
}
:
#{
e
.
message
}
"
end
end
...
...
lib/gitlab/repository_cache_adapter.rb
浏览文件 @
07e23c70
...
...
@@ -218,7 +218,7 @@ module Gitlab
def
expire_method_caches
(
methods
)
methods
.
each
do
|
name
|
unless
cached_methods
.
include?
(
name
.
to_sym
)
Rails
.
logger
.
error
"Requested to expire non-existent method '
#{
name
}
' for Repository"
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
error
"Requested to expire non-existent method '
#{
name
}
' for Repository"
next
end
...
...
spec/lib/gitlab/auth/ldap/config_spec.rb
浏览文件 @
07e23c70
...
...
@@ -168,7 +168,7 @@ AtlErSqafbECNDSwS5BX8yDpu5yRBJ4xegO/rNlmb8ICRYkuJapD1xXicFOsmfUK
end
it
'logs an error when an invalid key or cert are configured'
do
allow
(
Rails
.
l
ogger
).
to
receive
(
:error
)
allow
(
Gitlab
::
AppL
ogger
).
to
receive
(
:error
)
stub_ldap_config
(
options:
{
'host'
=>
'ldap.example.com'
,
...
...
@@ -183,7 +183,7 @@ AtlErSqafbECNDSwS5BX8yDpu5yRBJ4xegO/rNlmb8ICRYkuJapD1xXicFOsmfUK
config
.
adapter_options
expect
(
Rails
.
l
ogger
).
to
have_received
(
:error
).
with
(
/LDAP TLS Options/
).
twice
expect
(
Gitlab
::
AppL
ogger
).
to
have_received
(
:error
).
with
(
/LDAP TLS Options/
).
twice
end
context
'when verify_certificates is enabled'
do
...
...
spec/lib/gitlab/repository_cache_adapter_spec.rb
浏览文件 @
07e23c70
...
...
@@ -302,7 +302,7 @@ RSpec.describe Gitlab::RepositoryCacheAdapter do
it
'does not expire caches for non-existent methods'
do
expect
(
cache
).
not_to
receive
(
:expire
).
with
(
:nonexistent
)
expect
(
Rails
.
l
ogger
).
to
(
expect
(
Gitlab
::
AppL
ogger
).
to
(
receive
(
:error
).
with
(
"Requested to expire non-existent method 'nonexistent' for Repository"
))
repository
.
expire_method_caches
(
%i(nonexistent)
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录