summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.forgejo/workflows/test.yml2
-rw-r--r--pkg/container/docker_cli_test.go4
-rw-r--r--pkg/container/docker_run_test.go3
3 files changed, 4 insertions, 5 deletions
diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml
index 2fb8e9c..b329fad 100644
--- a/.forgejo/workflows/test.yml
+++ b/.forgejo/workflows/test.yml
@@ -58,7 +58,7 @@ jobs:
- name: build without docker
run: go build -tags WITHOUT_DOCKER -v ./...
- name: unit test
- run: go test -v ./pkg/jobparser ./pkg/model ./pkg/exprparser
+ run: go test -short -v ./pkg/container ./pkg/jobparser ./pkg/model ./pkg/exprparser
integration:
runs-on: lxc-bookworm
diff --git a/pkg/container/docker_cli_test.go b/pkg/container/docker_cli_test.go
index a6445be..d871a89 100644
--- a/pkg/container/docker_cli_test.go
+++ b/pkg/container/docker_cli_test.go
@@ -377,16 +377,12 @@ func TestParseWithExpose(t *testing.T) {
invalids := map[string]string{
":": "invalid port format for --expose: :",
"8080:9090": "invalid port format for --expose: 8080:9090",
- "/tcp": "invalid range format for --expose: /tcp, error: Empty string specified for ports.",
- "/udp": "invalid range format for --expose: /udp, error: Empty string specified for ports.",
"NaN/tcp": `invalid range format for --expose: NaN/tcp, error: strconv.ParseUint: parsing "NaN": invalid syntax`,
"NaN-NaN/tcp": `invalid range format for --expose: NaN-NaN/tcp, error: strconv.ParseUint: parsing "NaN": invalid syntax`,
"8080-NaN/tcp": `invalid range format for --expose: 8080-NaN/tcp, error: strconv.ParseUint: parsing "NaN": invalid syntax`,
"1234567890-8080/tcp": `invalid range format for --expose: 1234567890-8080/tcp, error: strconv.ParseUint: parsing "1234567890": value out of range`,
}
valids := map[string][]nat.Port{
- "8080/tcp": {"8080/tcp"},
- "8080/udp": {"8080/udp"},
"8080/ncp": {"8080/ncp"},
"8080-8080/udp": {"8080/udp"},
"8080-8082/tcp": {"8080/tcp", "8081/tcp", "8082/tcp"},
diff --git a/pkg/container/docker_run_test.go b/pkg/container/docker_run_test.go
index 9e85fb7..6a2c05b 100644
--- a/pkg/container/docker_run_test.go
+++ b/pkg/container/docker_run_test.go
@@ -20,6 +20,9 @@ import (
)
func TestDocker(t *testing.T) {
+ if testing.Short() {
+ t.Skip("skipping integration test")
+ }
ctx := context.Background()
client, err := GetDockerClient(ctx)
assert.NoError(t, err)