aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/command_test.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-12-20 12:17:14 +0800
committerGitHub <noreply@github.com>2024-12-20 12:17:14 +0800
commit52b319bc00712da095ee4121b616be232b1e455b (patch)
treee509235780bab858e43023247f82d1c956c71bf1 /modules/git/command_test.go
parentc66de245c4603c8426273f98af1a0c4d2855a677 (diff)
downloadgitea-52b319bc00712da095ee4121b616be232b1e455b.tar.gz
gitea-52b319bc00712da095ee4121b616be232b1e455b.zip
Refactor pprof labels and process desc (#32909)
* Deprecate "gopid" in log, it is not useful and requires very hacky approach * Remove "git.Command.SetDescription" because it is not useful and only makes the logs too flexible
Diffstat (limited to 'modules/git/command_test.go')
-rw-r--r--modules/git/command_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/git/command_test.go b/modules/git/command_test.go
index 9a6228c9ad..0823afd7f7 100644
--- a/modules/git/command_test.go
+++ b/modules/git/command_test.go
@@ -55,8 +55,8 @@ func TestGitArgument(t *testing.T) {
func TestCommandString(t *testing.T) {
cmd := NewCommandContextNoGlobals(context.Background(), "a", "-m msg", "it's a test", `say "hello"`)
- assert.EqualValues(t, cmd.prog+` a "-m msg" "it's a test" "say \"hello\""`, cmd.String())
+ assert.EqualValues(t, cmd.prog+` a "-m msg" "it's a test" "say \"hello\""`, cmd.LogString())
- cmd = NewCommandContextNoGlobals(context.Background(), "url: https://a:b@c/")
- assert.EqualValues(t, cmd.prog+` "url: https://sanitized-credential@c/"`, cmd.toString(true))
+ cmd = NewCommandContextNoGlobals(context.Background(), "url: https://a:b@c/", "/root/dir-a/dir-b")
+ assert.EqualValues(t, cmd.prog+` "url: https://sanitized-credential@c/" dir-a/dir-b`, cmd.LogString())
}