test: separate integration tests
This commit is contained in:
parent
1dfe7fea38
commit
a5516d55a5
6
.github/workflows/ci-build.yml
vendored
6
.github/workflows/ci-build.yml
vendored
@ -38,7 +38,11 @@ jobs:
|
|||||||
version: v1.64.2
|
version: v1.64.2
|
||||||
- name: check_gomod
|
- name: check_gomod
|
||||||
run: mise run check_gomod
|
run: mise run check_gomod
|
||||||
- name: test_ci
|
- name: test
|
||||||
env:
|
env:
|
||||||
DOCKER_API_VERSION: "1.45"
|
DOCKER_API_VERSION: "1.45"
|
||||||
run: mise run test_ci
|
run: mise run test_ci
|
||||||
|
- name: test_integration
|
||||||
|
env:
|
||||||
|
DOCKER_API_VERSION: "1.45"
|
||||||
|
run: mise run test_integration_ci
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
//go:build integration
|
||||||
|
|
||||||
package container_test
|
package container_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -15,7 +17,7 @@ import (
|
|||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestClientStartStop(t *testing.T) {
|
func TestIntegrationClientStartStop(t *testing.T) {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
t.Cleanup(cancel)
|
t.Cleanup(cancel)
|
||||||
|
|
||||||
@ -65,7 +67,7 @@ func TestClientStartStop(t *testing.T) {
|
|||||||
assert.False(t, running)
|
assert.False(t, running)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestClientRemoveContainers(t *testing.T) {
|
func TestIntegrationClientRemoveContainers(t *testing.T) {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
t.Cleanup(cancel)
|
t.Cleanup(cancel)
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
//go:build integration
|
||||||
|
|
||||||
package mediaserver_test
|
package mediaserver_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -14,7 +16,7 @@ import (
|
|||||||
|
|
||||||
const component = "mediaserver"
|
const component = "mediaserver"
|
||||||
|
|
||||||
func TestMediaServerStartStop(t *testing.T) {
|
func TestIntegrationMediaServerStartStop(t *testing.T) {
|
||||||
logger := testhelpers.NewTestLogger()
|
logger := testhelpers.NewTestLogger()
|
||||||
apiClient, err := client.NewClientWithOpts(client.FromEnv)
|
apiClient, err := client.NewClientWithOpts(client.FromEnv)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
@ -7,11 +7,21 @@ dir = "{{cwd}}"
|
|||||||
run = "go test -v ./..."
|
run = "go test -v ./..."
|
||||||
alias = "t"
|
alias = "t"
|
||||||
|
|
||||||
|
[tasks.test_integration]
|
||||||
|
description = "Run integration tests"
|
||||||
|
dir = "{{cwd}}"
|
||||||
|
run = "go test -v -tags=integration -run TestIntegration ./..."
|
||||||
|
alias = "ti"
|
||||||
|
|
||||||
[tasks.test_ci]
|
[tasks.test_ci]
|
||||||
description = "Run tests in CI"
|
description = "Run tests in CI"
|
||||||
dir = "{{cwd}}"
|
dir = "{{cwd}}"
|
||||||
run = "go test -v -race ./..."
|
run = "go test -v -race ./..."
|
||||||
alias = "tci"
|
|
||||||
|
[tasks.test_integration_ci]
|
||||||
|
description = "Run integration tests in CI"
|
||||||
|
dir = "{{cwd}}"
|
||||||
|
run = "go test -v -race -tags=integration -run TestIntegration ./..."
|
||||||
|
|
||||||
[tasks.lint]
|
[tasks.lint]
|
||||||
description = "Run linters"
|
description = "Run linters"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
//go:build integration
|
||||||
|
|
||||||
package multiplexer_test
|
package multiplexer_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@ -15,7 +17,7 @@ import (
|
|||||||
|
|
||||||
const component = "multiplexer"
|
const component = "multiplexer"
|
||||||
|
|
||||||
func TestMultiplexer(t *testing.T) {
|
func TestIntegrationMultiplexer(t *testing.T) {
|
||||||
logger := testhelpers.NewTestLogger()
|
logger := testhelpers.NewTestLogger()
|
||||||
apiClient, err := client.NewClientWithOpts(client.FromEnv)
|
apiClient, err := client.NewClientWithOpts(client.FromEnv)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user