mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 09:57:07 +02:00
Backport #26001 by @wxiaoguang Regression of #24832 Fix the bug and add a test for it Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
1ba0baa030
commit
4d5e3b9372
2 files changed
+7
-1
No files matched your search
@@ -48,6 +48,12 @@ func TestDecodeEnvironmentKey(t *testing.T) {
|
||||
assert.Equal(t, "", key)
|
||||
assert.False(t, file)
|
||||
|
||||
ok, section, key, file = decodeEnvironmentKey(prefix, suffix, "GITEA____KEY")
|
||||
assert.True(t, ok)
|
||||
assert.Equal(t, "", section)
|
||||
assert.Equal(t, "KEY", key)
|
||||
assert.False(t, file)
|
||||
|
||||
ok, section, key, file = decodeEnvironmentKey(prefix, suffix, "GITEA__SEC__KEY")
|
||||
assert.True(t, ok)
|
||||
assert.Equal(t, "sec", section)
|
||||
|
||||
Reference in new issue
Block a user