adding merge printer tests

This commit is contained in:
Julien Neuhart
2019-07-23 16:50:24 +02:00
parent 08e7a2c065
commit 5feff0d0ec
2 changed files with 60 additions and 0 deletions

View File

@@ -8,6 +8,11 @@ import (
"github.com/thecodingmachine/gotenberg/internal/pkg/xrand"
)
/*
testdataDirectoryPath should be
the absolute of the testdata INSIDE
the Docker image.
*/
const testdataDirectoryPath string = "/gotenberg/tests/test/testdata"
// GenerateDestination simply generates
@@ -16,6 +21,15 @@ func GenerateDestination() string {
return fmt.Sprintf("/tmp/%s.pdf", xrand.Get())
}
// MergeFpaths return the paths
// of the PDF files used in tests.
func MergeFpaths(t *testing.T) []string {
return []string{
fpath(t, "pdf", "gotenberg.pdf"),
fpath(t, "pdf", "gotenberg_bis.pdf"),
}
}
// OfficeFpaths return the paths
// of the Office documents used in tests.
func OfficeFpaths(t *testing.T) []string {