mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-14 11:22:15 +01:00
adding new attribute lock (#8)
This commit is contained in:
@@ -41,6 +41,8 @@ func TestCommandTimeoutError(t *testing.T) {
|
||||
func TestRun(t *testing.T) {
|
||||
var cmd string
|
||||
|
||||
load("../../../_tests/configurations/gotenberg.yml")
|
||||
|
||||
// case 1: uses a simple command.
|
||||
cmd = "echo Hello world"
|
||||
if err := forest.run(cmd, strings.Fields("/bin/sh -c"), 30); err != nil {
|
||||
@@ -58,6 +60,14 @@ func TestRun(t *testing.T) {
|
||||
if err := forest.run(cmd, strings.Fields("/bin/sh -c"), 30); err == nil {
|
||||
t.Errorf("Command '%s' should not have worked", cmd)
|
||||
}
|
||||
|
||||
load("../../../_tests/configurations/no-lock-gotenberg.yml")
|
||||
|
||||
// case 4: uses a configuration with a no lock strategy.
|
||||
cmd = "echo Hello world"
|
||||
if err := forest.run(cmd, strings.Fields("/bin/sh -c"), 30); err != nil {
|
||||
t.Errorf("Command '%s' should have worked", cmd)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnconv(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user