chore: refactor log limit in rest (#3572)

This commit is contained in:
Kevin Wan
2023-09-16 22:33:30 +08:00
committed by GitHub
parent cc21f5fae2
commit 0dcede6457
7 changed files with 50 additions and 15 deletions

View File

@@ -51,6 +51,11 @@ b`,
}
}
func TestReadTextError(t *testing.T) {
_, err := ReadText("not-exist")
assert.NotNil(t, err)
}
func TestReadTextLines(t *testing.T) {
text := `1
@@ -94,6 +99,11 @@ func TestReadTextLines(t *testing.T) {
}
}
func TestReadTextLinesError(t *testing.T) {
_, err := ReadTextLines("not-exist")
assert.NotNil(t, err)
}
func TestDupReadCloser(t *testing.T) {
input := "hello"
reader := io.NopCloser(bytes.NewBufferString(input))