Skip to content

Commit fd1acee

Browse files
committed
revert DebugDump rename
1 parent 24e0b1d commit fd1acee

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

cmd_generic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ func TestUnlink(t *testing.T) {
287287
})
288288
}
289289

290-
func TestDump(t *testing.T) {
290+
func TestDumpCommand(t *testing.T) {
291291
s, c := runWithClient(t)
292292
s.Set("existing-key", "value")
293293
s.HSet("set-key", "a", "b")

miniredis.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,15 @@ func (m *Miniredis) Server() *server.Server {
373373
return m.srv
374374
}
375375

376-
// DebugDump returns a text version of the selected DB, usable for debugging.
376+
// Dump returns a text version of the selected DB, usable for debugging.
377377
//
378-
// DebugDump limits the maximum length of each key:value to "DumpMaxLineLen" characters.
378+
// Dump limits the maximum length of each key:value to "DumpMaxLineLen" characters.
379379
// To increase that, call something like:
380380
//
381381
// miniredis.DumpMaxLineLen = 1024
382382
// mr, _ = miniredis.Run()
383-
// mr.DebugDump()
384-
func (m *Miniredis) DebugDump() string {
383+
// mr.Dump()
384+
func (m *Miniredis) Dump() string {
385385
m.Lock()
386386
defer m.Unlock()
387387

miniredis_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ func TestAddr(t *testing.T) {
7676
mustDo(t, c, "PING", proto.Inline("PONG"))
7777
}
7878

79-
func TestDebugDump(t *testing.T) {
79+
func TestDump(t *testing.T) {
8080
s := RunT(t)
8181
s.Set("aap", "noot")
8282
s.Set("vuur", "mies")
8383
s.HSet("ahash", "aap", "noot")
8484
s.HSet("ahash", "vuur", "mies")
85-
if have, want := s.DebugDump(), `- aap
85+
if have, want := s.Dump(), `- aap
8686
"noot"
8787
- ahash
8888
aap: "noot"
@@ -96,7 +96,7 @@ func TestDebugDump(t *testing.T) {
9696
// Tricky whitespace
9797
s.Select(1)
9898
s.Set("whitespace", "foo\nbar\tbaz!")
99-
if have, want := s.DebugDump(), `- whitespace
99+
if have, want := s.Dump(), `- whitespace
100100
"foo\nbar\tbaz!"
101101
`; have != want {
102102
t.Errorf("have: %q, want: %q", have, want)
@@ -107,7 +107,7 @@ func TestDebugDump(t *testing.T) {
107107
s.Set("long", "This is a rather long key, with some fox jumping over a fence or something.")
108108
s.Set("countonme", "0123456789012345678901234567890123456789012345678901234567890123456789")
109109
s.HSet("hlong", "long", "This is another rather long key, with some fox jumping over a fence or something.")
110-
if have, want := s.DebugDump(), `- countonme
110+
if have, want := s.Dump(), `- countonme
111111
"01234567890123456789012345678901234567890123456789012"...(70)
112112
- hlong
113113
long: "This is another rather long key, with some fox jumpin"...(81)
@@ -123,7 +123,7 @@ func TestDumpList(t *testing.T) {
123123
s.Push("elements", "earth")
124124
s.Push("elements", "wind")
125125
s.Push("elements", "fire")
126-
if have, want := s.DebugDump(), `- elements
126+
if have, want := s.Dump(), `- elements
127127
"earth"
128128
"wind"
129129
"fire"
@@ -137,7 +137,7 @@ func TestDumpSet(t *testing.T) {
137137
s.SetAdd("elements", "earth")
138138
s.SetAdd("elements", "wind")
139139
s.SetAdd("elements", "fire")
140-
if have, want := s.DebugDump(), `- elements
140+
if have, want := s.Dump(), `- elements
141141
"earth"
142142
"fire"
143143
"wind"
@@ -151,7 +151,7 @@ func TestDumpSortedSet(t *testing.T) {
151151
s.ZAdd("elements", 2.0, "wind")
152152
s.ZAdd("elements", 3.0, "earth")
153153
s.ZAdd("elements", 1.0, "fire")
154-
if have, want := s.DebugDump(), `- elements
154+
if have, want := s.Dump(), `- elements
155155
1.000000: "fire"
156156
2.000000: "wind"
157157
3.000000: "earth"
@@ -165,7 +165,7 @@ func TestDumpStream(t *testing.T) {
165165
s.XAdd("elements", "0-1", []string{"name", "earth"})
166166
s.XAdd("elements", "123456789-0", []string{"name", "wind"})
167167
s.XAdd("elements", "123456789-1", []string{"name", "fire"})
168-
if have, want := s.DebugDump(), `- elements
168+
if have, want := s.Dump(), `- elements
169169
0-1
170170
"name": "earth"
171171
123456789-0
@@ -177,7 +177,7 @@ func TestDumpStream(t *testing.T) {
177177
}
178178

179179
s.XAdd("elements", "*", []string{"name", "Leeloo"})
180-
fullHave := s.DebugDump()
180+
fullHave := s.Dump()
181181
have := strings.Split(fullHave, "\n")[8]
182182
want := ` "name": "Leeloo"`
183183
if have != want {

0 commit comments

Comments
 (0)