summaryrefslogtreecommitdiff
path: root/internal/container/container_test.go
blob: c6d613a0a9d05c9f4eaf61db5cde15958f7ef44c (plain)
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
package container_test

import (
	"testing"
	"time"

	"github.com/spiral/roadrunner-binary/v2/internal/container"

	endure "github.com/spiral/endure/pkg/container"
	"github.com/stretchr/testify/assert"
)

func TestNewContainer(t *testing.T) { // there is no legal way to test container options
	c, err := container.NewContainer(container.Config{})
	c2, err2 := container.NewContainer(container.Config{
		GracePeriod: time.Second,
		PrintGraph:  true,
		RetryOnFail: true,
		LogLevel:    endure.WarnLevel,
	})

	assert.NoError(t, err)
	assert.NotNil(t, c)

	assert.NoError(t, err2)
	assert.NotNil(t, c2)
}