-
Notifications
You must be signed in to change notification settings - Fork 2
/
execution_test.go
35 lines (27 loc) · 727 Bytes
/
execution_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package dockerlang
import (
"github.com/stretchr/testify/suite"
)
type ExecutionSuite struct {
suite.Suite
}
func (s *ExecutionSuite) AfterTest(suiteName, testName string) {
ShutdownExecutionEngine()
}
// NOTE: for these tests to run, we need to ensure that docker is running on the
// host machine!
func (s *ExecutionSuite) TestNewExecutionEngine() {
err := NewExecutionEngine()
s.NoError(err)
}
func (s *ExecutionSuite) TestShutdownExecutionEngine() {
err := NewExecutionEngine()
s.NoError(err)
err = ShutdownExecutionEngine()
s.NoError(err)
}
func (s *ExecutionSuite) TestShutdownExecutionEngine_NonExistent() {
executer.Network = "non-existent network"
err := ShutdownExecutionEngine()
s.NoError(err)
}