forked from quic-go/quic-go
use docker exec instead of mounting to work around a travis issue
This commit is contained in:
@@ -4,8 +4,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/tebeka/selenium"
|
||||
|
||||
@@ -120,23 +118,11 @@ var _ = Describe("Chrome tests", func() {
|
||||
close(done)
|
||||
}, 10)
|
||||
|
||||
It("downloads a small file", func(done Done) {
|
||||
var err error
|
||||
err = wd.Get("https://quic.clemente.io/data")
|
||||
It("downloads a small file", func() {
|
||||
err := wd.Get("https://quic.clemente.io/data")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
var file *os.File
|
||||
Eventually(func() error {
|
||||
file, err = os.Open(filepath.Join(downloadDir, "data"))
|
||||
return err
|
||||
}, 30, 0.1).ShouldNot(HaveOccurred())
|
||||
fi, err := file.Stat()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Eventually(fi.Size(), 10, 0.1).Should(Equal(int64(dataLen)))
|
||||
contents := make([]byte, dataLen)
|
||||
_, err = file.Read(contents)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(contents).To(Equal(data))
|
||||
close(done)
|
||||
Eventually(func() int { return getDownloadSize("data") }, 30, 0.1).Should(Equal(dataLen))
|
||||
Expect(getDownloadMD5("data")).To(Equal(dataMD5))
|
||||
}, 60)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user