mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-23 12:37:07 +00:00
Convert test message lengths to int64 to fix tests
This commit is contained in:
@@ -306,7 +306,7 @@ func TestFSSize(t *testing.T) {
|
|||||||
mbName := "fred"
|
mbName := "fred"
|
||||||
subjects := []string{"a", "br", "much longer than the others"}
|
subjects := []string{"a", "br", "much longer than the others"}
|
||||||
sentIds := make([]string, len(subjects))
|
sentIds := make([]string, len(subjects))
|
||||||
sentSizes := make([]int, len(subjects))
|
sentSizes := make([]int64, len(subjects))
|
||||||
|
|
||||||
for i, subj := range subjects {
|
for i, subj := range subjects {
|
||||||
// Add a message
|
// Add a message
|
||||||
@@ -476,7 +476,7 @@ func setupDataStore(cfg config.DataStoreConfig) (*FileDataStore, *bytes.Buffer)
|
|||||||
// deliverMessage creates and delivers a message to the specific mailbox, returning
|
// deliverMessage creates and delivers a message to the specific mailbox, returning
|
||||||
// the size of the generated message.
|
// the size of the generated message.
|
||||||
func deliverMessage(ds *FileDataStore, mbName string, subject string,
|
func deliverMessage(ds *FileDataStore, mbName string, subject string,
|
||||||
date time.Time) (id string, size int) {
|
date time.Time) (id string, size int64) {
|
||||||
// Build fake SMTP message for delivery
|
// Build fake SMTP message for delivery
|
||||||
testMsg := make([]byte, 0, 300)
|
testMsg := make([]byte, 0, 300)
|
||||||
testMsg = append(testMsg, []byte("To: somebody@host\r\n")...)
|
testMsg = append(testMsg, []byte("To: somebody@host\r\n")...)
|
||||||
@@ -503,7 +503,7 @@ func deliverMessage(ds *FileDataStore, mbName string, subject string,
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return id, len(testMsg)
|
return id, int64(len(testMsg))
|
||||||
}
|
}
|
||||||
|
|
||||||
func teardownDataStore(ds *FileDataStore) {
|
func teardownDataStore(ds *FileDataStore) {
|
||||||
|
|||||||
Reference in New Issue
Block a user