We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c5dfac commit eba8552Copy full SHA for eba8552
commands/run_test.go
@@ -1,7 +1,21 @@
1
package commands
2
3
-import "testing"
+import (
4
+ "github.com/stretchr/testify/assert"
5
+ "os/exec"
6
+ "testing"
7
+)
8
-func TestNothing(t *testing.T) {
- // NO-OP
9
+func TestTimedOutExecution(t *testing.T) {
10
+ cmd := exec.Command("sleep", "1")
11
+ status, err := timedExecution(cmd, 999.99)
12
+ assert.Equal(t, err, nil)
13
+ assert.Equal(t, status, TO)
14
+}
15
+
16
+func TestTimedExecution(t *testing.T) {
17
18
+ status, err := timedExecution(cmd, 1250)
19
20
+ assert.Equal(t, status, OK)
21
}
0 commit comments