Merge pull request #7 from vulcanize/VDB-347-Squelch-lightSync
VDB-347 Squelch lightSync in stdout
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
package history
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
"io"
|
||||
"text/template"
|
||||
)
|
||||
|
||||
@@ -52,6 +52,7 @@ func MakeRange(min, max int64) []int64 {
|
||||
return a
|
||||
}
|
||||
|
||||
func (window ValidationWindow) Log(out io.Writer) {
|
||||
ParsedWindowTemplate.Execute(out, window)
|
||||
func (window ValidationWindow) GetString() string {
|
||||
return fmt.Sprintf("Validating Blocks |%v|-- Validation Window --|%v}|",
|
||||
window.LowerBound, window.UpperBound)
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
package history_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
@@ -50,15 +48,4 @@ var _ = Describe("Validation window", func() {
|
||||
|
||||
Expect(numberOfBlocksCreated).To(Equal(expected))
|
||||
})
|
||||
|
||||
It("logs window message", func() {
|
||||
expectedMessage := &bytes.Buffer{}
|
||||
window := history.ValidationWindow{LowerBound: 5, UpperBound: 7}
|
||||
history.ParsedWindowTemplate.Execute(expectedMessage, window)
|
||||
actualMessage := &bytes.Buffer{}
|
||||
|
||||
window.Log(actualMessage)
|
||||
|
||||
Expect(actualMessage).To(Equal(expectedMessage))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user