-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check whether browsers can be tested
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package scenarios | ||
|
||
import ( | ||
"os/exec" | ||
"strings" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestElasticSyntheticsRunnable(t *testing.T) { | ||
// this test should fail if synthetics isn't correctly setup in the current environment | ||
cmd := exec.Command("sh", "-c", "echo 'step(\"t\", () => { })' | elastic-synthetics --inline") | ||
var out strings.Builder | ||
cmd.Stdout = &out | ||
cmd.Stderr = &out | ||
cmd.Run() | ||
require.Equal(t, 0, cmd.ProcessState.ExitCode(), "command exited with bad code: %s", out.String()) | ||
} |