mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-13 10:52:15 +01:00
preparing mardown file handling in Dockerfiles + refactoring build directory
This commit is contained in:
@@ -34,6 +34,7 @@ const (
|
||||
// filesTypes associates a file extension with its file kind counterpart.
|
||||
var filesTypes = map[string]Type{
|
||||
".pdf": PDFType,
|
||||
".htm": HTMLType,
|
||||
".html": HTMLType,
|
||||
".doc": OfficeType,
|
||||
".docx": OfficeType,
|
||||
|
||||
@@ -114,11 +114,26 @@ func TestConvertHandler(t *testing.T) {
|
||||
t.Errorf("Handler returned a wrong status code: got %v want %v", status, http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
// case 4: sends a request with two files.
|
||||
// case 3: sends two requests (almost) simultany.
|
||||
path, _ = filepath.Abs("../_tests/configurations/gotenberg.yml")
|
||||
appConfig, _ = config.NewAppConfig(path)
|
||||
process.Load(appConfig.CommandsConfig)
|
||||
|
||||
/*sum := 0
|
||||
for sum < 2 {
|
||||
go func() {
|
||||
path, _ := filepath.Abs("../_tests/file.docx")
|
||||
req := makeRequest(path)
|
||||
rr := httptest.NewRecorder()
|
||||
h.ServeHTTP(rr, req)
|
||||
if status := rr.Code; status != http.StatusInternalServerError {
|
||||
t.Errorf("Handler returned a wrong status code: got %v want %v", status, http.StatusInternalServerError)
|
||||
}
|
||||
}()
|
||||
sum++
|
||||
}*/
|
||||
|
||||
// case 4: sends a request with two files.
|
||||
oPath, _ = filepath.Abs("../_tests/file.docx")
|
||||
path, _ = filepath.Abs("../_tests/file.pdf")
|
||||
req = makeRequest(oPath, path)
|
||||
|
||||
Reference in New Issue
Block a user