diff options
| author | Lisandro Pin <lisandro.pin@proton.ch> | 2025-12-02 19:14:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-02 10:14:24 -0800 |
| commit | ebb06a3908990c31dcfb4995a69682d836228179 (patch) | |
| tree | d3fe41d490e29671cff7b40af760abb80a12d19f /weed/shell/command_volume_check_disk_test.go | |
| parent | ee775825bcd46911adeb811241bad56836dab05f (diff) | |
| download | seaweedfs-ebb06a3908990c31dcfb4995a69682d836228179.tar.xz seaweedfs-ebb06a3908990c31dcfb4995a69682d836228179.zip | |
Mutex command output writes for `volume.check.disk`. (#7605)
Prevents potential screen garbling when operations are parallelized
.Also simplifies logging by automatically adding newlines on output, if necessary.
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Diffstat (limited to 'weed/shell/command_volume_check_disk_test.go')
| -rw-r--r-- | weed/shell/command_volume_check_disk_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/shell/command_volume_check_disk_test.go b/weed/shell/command_volume_check_disk_test.go index eee9103a8..ec958fbc4 100644 --- a/weed/shell/command_volume_check_disk_test.go +++ b/weed/shell/command_volume_check_disk_test.go @@ -278,14 +278,14 @@ func TestVolumeCheckDiskHelperMethods(t *testing.T) { } // Test write method - vcd.write("test %s\n", "message") + vcd.write("test %s", "message") if buf.String() != "test message\n" { t.Errorf("write() output = %q, want %q", buf.String(), "test message\n") } // Test writeVerbose with verbose=true buf.Reset() - vcd.writeVerbose("verbose %d\n", 123) + vcd.writeVerbose("verbose %d", 123) if buf.String() != "verbose 123\n" { t.Errorf("writeVerbose() with verbose=true output = %q, want %q", buf.String(), "verbose 123\n") } @@ -293,7 +293,7 @@ func TestVolumeCheckDiskHelperMethods(t *testing.T) { // Test writeVerbose with verbose=false buf.Reset() vcd.verbose = false - vcd.writeVerbose("should not appear\n") + vcd.writeVerbose("should not appear") if buf.String() != "" { t.Errorf("writeVerbose() with verbose=false output = %q, want empty", buf.String()) } |
