Skip to content

Slow tests: Manifest tests include external HTTP requests #935

Closed
@IamTheFij

Description

Support guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Running tests can take over a minute at times. Upon investigation, this appears to be due to the manifest tests depending on an HTTP request to external docker registries. Not only is this slow, but it results in fragility if images or hosts that are queried become unavailable.

Expected behaviour

No HTTP requests made when running non-integration tests.

Actual behaviour

Tests take several seconds while waiting for HTTP requests to complete.

Steps to reproduce

  1. docker buildx bake test
  2. View results

Diun version

1.4.25

Docker info

Client:
 Version:    24.0.2-rd
 Context:    rancher-desktop
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.5
    Path:     /Users/ifij/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.19.0
    Path:     /Users/ifij/.docker/cli-plugins/docker-compose

Server:
 Containers: 15
  Running: 0
  Paused: 0
  Stopped: 15
 Images: 9
 Server Version: 23.0.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1fbd70374134b891f97ce19c70b6e50c7b9f4e0d
 runc version: 860f061b76bb4fc671f0f9e900f7d80ff93d4eb7
 init version:
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 6.1.30-0-virt
 Operating System: Alpine Linux v3.18
 OSType: linux
 Architecture: aarch64
 CPUs: 2
 Total Memory: 3.824GiB
 Name: lima-rancher-desktop
 ID: 836db3ee-14a0-4786-84a4-6683c20f3e7f
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Docker Compose config

No response

Logs

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 3.29kB done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 transferring context: 160B done
#2 DONE 0.0s

#3 resolve image config for docker.io/docker/dockerfile:1
#3 DONE 2.2s

#4 docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50032edf31be0021
#4 CACHED

#5 [internal] load metadata for docker.io/library/golang:1.20-alpine
#5 ...

#6 [internal] load metadata for docker.io/tonistiigi/xx:1.1.2
#6 DONE 2.2s

#5 [internal] load metadata for docker.io/library/golang:1.20-alpine
#5 DONE 2.2s

#7 [xx 1/1] FROM docker.io/tonistiigi/xx:1.1.2@sha256:9dde7edeb9e4a957ce78be9f8c0fbabe0129bf5126933cd3574888f443731cda
#7 DONE 0.0s

#8 [base 1/4] FROM docker.io/library/golang:1.20-alpine@sha256:7efb78dac256c450d194e556e96f80936528335033a26d703ec8146cec8c2090
#8 DONE 0.0s

#9 [internal] load build context
#9 transferring context: 345.12kB 0.0s done
#9 DONE 0.0s

#10 [base 4/4] WORKDIR /src
#10 CACHED

#11 [vendored 1/2] COPY go.mod go.sum ./
#11 CACHED

#12 [base 3/4] RUN apk add --no-cache file git
#12 CACHED

#13 [vendored 2/2] RUN --mount=type=cache,target=/go/pkg/mod   go mod download
#13 CACHED

#14 [base 2/4] COPY --from=xx / /
#14 CACHED

#15 [test 1/2] RUN apk add --no-cache gcc linux-headers musl-dev
#15 CACHED

#16 [test 2/2] RUN --mount=type=bind,target=.     --mount=type=cache,target=/go/pkg/mod     --mount=type=cache,target=/root/.cache/go-build <<EOT (set -ex...)
#16 0.239 + go test -v '-coverprofile=/tmp/coverage.txt' '-covermode=atomic' -race ./...
#16 1.034 ?   	github.com/crazy-max/diun/v4/cmd	[no test files]
#16 1.034 ?   	github.com/crazy-max/diun/v4/internal/app	[no test files]
#16 1.272 ?   	github.com/crazy-max/diun/v4/internal/db	[no test files]
#16 1.272 ?   	github.com/crazy-max/diun/v4/internal/grpc	[no test files]
#16 1.272 ?   	github.com/crazy-max/diun/v4/internal/grpc/logger	[no test files]
#16 1.272 ?   	github.com/crazy-max/diun/v4/internal/logging	[no test files]
#16 1.272 ?   	github.com/crazy-max/diun/v4/internal/model	[no test files]
#16 1.272 ?   	github.com/crazy-max/diun/v4/internal/msg	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/amqp	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/discord	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/gotify	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/mail	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/matrix	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/mqtt	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/notifier	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/ntfy	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/pushover	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/rocketchat	[no test files]
#16 1.273 ?   	github.com/crazy-max/diun/v4/internal/notif/script	[no test files]
#16 1.274 ?   	github.com/crazy-max/diun/v4/internal/notif/signalrest	[no test files]
#16 1.274 ?   	github.com/crazy-max/diun/v4/internal/notif/slack	[no test files]
#16 1.274 ?   	github.com/crazy-max/diun/v4/internal/notif/teams	[no test files]
#16 1.274 ?   	github.com/crazy-max/diun/v4/internal/notif/telegram	[no test files]
#16 1.274 ?   	github.com/crazy-max/diun/v4/internal/notif/webhook	[no test files]
#16 1.361 === RUN   TestLoadFile
#16 1.361 === RUN   TestLoadFile/Failed_on_non-existing_file
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No configuration file found"}
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No DIUN_* environment variables defined"}
#16 1.361 === RUN   TestLoadFile/Fail_on_wrong_file_format
#16 1.361 === RUN   TestLoadFile/Fail_on_no_UUID_for_Healthchecks
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from file: /src/internal/config/fixtures/config.err.hc.yml"}
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No DIUN_* environment variables defined"}
#16 1.361 === RUN   TestLoadFile/Fail_on_no_provider
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from file: /src/internal/config/fixtures/config.err.provider.yml"}
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No DIUN_* environment variables defined"}
#16 1.361 === RUN   TestLoadFile/Success
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from file: /src/internal/config/fixtures/config.test.yml"}
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No DIUN_* environment variables defined"}
#16 1.361 --- PASS: TestLoadFile (0.01s)
#16 1.361     --- PASS: TestLoadFile/Failed_on_non-existing_file (0.00s)
#16 1.361     --- PASS: TestLoadFile/Fail_on_wrong_file_format (0.00s)
#16 1.361     --- PASS: TestLoadFile/Fail_on_no_UUID_for_Healthchecks (0.00s)
#16 1.361     --- PASS: TestLoadFile/Fail_on_no_provider (0.00s)
#16 1.361     --- PASS: TestLoadFile/Success (0.01s)
#16 1.361 === RUN   TestLoadEnv
#16 1.361 === RUN   TestLoadEnv/no_env_vars
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No configuration file found"}
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No DIUN_* environment variables defined"}
#16 1.361 === RUN   TestLoadEnv/docker_provider
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No configuration file found"}
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from 1 environment variable(s)"}
#16 1.361 === RUN   TestLoadEnv/docker_provider_and_regopts
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No configuration file found"}
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from 6 environment variable(s)"}
#16 1.361 === RUN   TestLoadEnv/swarm_provider_and_notif_telegram
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No configuration file found"}
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from 3 environment variable(s)"}
#16 1.361 === RUN   TestLoadEnv/file_provider_and_notif_script
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No configuration file found"}
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from 3 environment variable(s)"}
#16 1.361 --- PASS: TestLoadEnv (0.00s)
#16 1.361     --- PASS: TestLoadEnv/no_env_vars (0.00s)
#16 1.361     --- PASS: TestLoadEnv/docker_provider (0.00s)
#16 1.361     --- PASS: TestLoadEnv/docker_provider_and_regopts (0.00s)
#16 1.361     --- PASS: TestLoadEnv/swarm_provider_and_notif_telegram (0.00s)
#16 1.361     --- PASS: TestLoadEnv/file_provider_and_notif_script (0.00s)
#16 1.361 === RUN   TestLoadMixed
#16 1.361 === RUN   TestLoadMixed/env_vars_and_invalid_file
#16 1.361 === RUN   TestLoadMixed/docker_provider_(file)_and_notif_mails_(envs)
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from file: /src/internal/config/fixtures/config.docker.yml"}
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from 7 environment variable(s)"}
#16 1.361 === RUN   TestLoadMixed/file_provider_and_notif_webhook_env_override
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from file: /src/internal/config/fixtures/config.file.yml"}
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from 5 environment variable(s)"}
#16 1.361 --- PASS: TestLoadMixed (0.01s)
#16 1.361     --- PASS: TestLoadMixed/env_vars_and_invalid_file (0.00s)
#16 1.361     --- PASS: TestLoadMixed/docker_provider_(file)_and_notif_mails_(envs) (0.00s)
#16 1.361     --- PASS: TestLoadMixed/file_provider_and_notif_webhook_env_override (0.01s)
#16 1.361 === RUN   TestValidation
#16 1.361 === RUN   TestValidation/Success
#16 1.361 {"level":"info","time":"2023-08-07T19:37:17Z","message":"Configuration loaded from file: /src/internal/config/fixtures/config.validate.yml"}
#16 1.361 {"level":"debug","time":"2023-08-07T19:37:17Z","message":"No DIUN_* environment variables defined"}
#16 1.361 --- PASS: TestValidation (0.01s)
#16 1.361     --- PASS: TestValidation/Success (0.01s)
#16 1.361 PASS
#16 1.361 	github.com/crazy-max/diun/v4/internal/config	coverage: 96.2% of statements
#16 1.361 ok  	github.com/crazy-max/diun/v4/internal/config	0.088s	coverage: 96.2% of statements
#16 1.702 ?   	github.com/crazy-max/diun/v4/internal/provider/docker	[no test files]
#16 1.702 ?   	github.com/crazy-max/diun/v4/internal/provider/dockerfile	[no test files]
#16 1.744 === RUN   TestValidateImage
#16 1.744 === RUN   TestValidateImage/All_excluded_by_default
#16 1.744 === PAUSE TestValidateImage/All_excluded_by_default
#16 1.744 === RUN   TestValidateImage/Include_using_watch_by_default
#16 1.744 === PAUSE TestValidateImage/Include_using_watch_by_default
#16 1.744 === RUN   TestValidateImage/Include_using_global_settings
#16 1.744 === PAUSE TestValidateImage/Include_using_global_settings
#16 1.744 === RUN   TestValidateImage/Override_default_image_values_with_labels_(true_>_false)
#16 1.744 === PAUSE TestValidateImage/Override_default_image_values_with_labels_(true_>_false)
#16 1.744 === RUN   TestValidateImage/Override_default_image_values_with_labels_(false_>_true)
#16 1.744 === PAUSE TestValidateImage/Override_default_image_values_with_labels_(false_>_true)
#16 1.744 === RUN   TestValidateImage/Set_valid_notify_on
#16 1.744 === PAUSE TestValidateImage/Set_valid_notify_on
#16 1.744 === RUN   TestValidateImage/Set_invalid_notify_on
#16 1.744 === PAUSE TestValidateImage/Set_invalid_notify_on
#16 1.744 === CONT  TestValidateImage/All_excluded_by_default
#16 1.744 === CONT  TestValidateImage/Set_invalid_notify_on
#16 1.744 === CONT  TestValidateImage/Override_default_image_values_with_labels_(false_>_true)
#16 1.744 === CONT  TestValidateImage/Set_valid_notify_on
#16 1.744 === CONT  TestValidateImage/Include_using_watch_by_default
#16 1.744 === CONT  TestValidateImage/Include_using_global_settings
#16 1.744 === CONT  TestValidateImage/Override_default_image_values_with_labels_(true_>_false)
#16 1.744 --- PASS: TestValidateImage (0.00s)
#16 1.744     --- PASS: TestValidateImage/Set_invalid_notify_on (0.00s)
#16 1.744     --- PASS: TestValidateImage/All_excluded_by_default (0.00s)
#16 1.744     --- PASS: TestValidateImage/Override_default_image_values_with_labels_(false_>_true) (0.00s)
#16 1.744     --- PASS: TestValidateImage/Set_valid_notify_on (0.00s)
#16 1.744     --- PASS: TestValidateImage/Include_using_global_settings (0.00s)
#16 1.744     --- PASS: TestValidateImage/Include_using_watch_by_default (0.00s)
#16 1.744     --- PASS: TestValidateImage/Override_default_image_values_with_labels_(true_>_false) (0.00s)
#16 1.744 PASS
#16 1.744 	github.com/crazy-max/diun/v4/internal/provider	coverage: 35.7% of statements
#16 1.744 ok  	github.com/crazy-max/diun/v4/internal/provider	0.041s	coverage: 35.7% of statements
#16 2.141 ?   	github.com/crazy-max/diun/v4/internal/provider/kubernetes	[no test files]
#16 2.184 === RUN   TestListJobFilename
#16 2.184 {"level":"info","provider":"file","time":"2023-08-07T19:37:18Z","message":"Found 8 image(s) to analyze"}
#16 2.184 --- PASS: TestListJobFilename (0.00s)
#16 2.184 === RUN   TestListJobDirectory
#16 2.184 {"level":"info","provider":"file","time":"2023-08-07T19:37:18Z","message":"Found 13 image(s) to analyze"}
#16 2.184 --- PASS: TestListJobDirectory (0.00s)
#16 2.184 === RUN   TestDefaultImageOptions
#16 2.184 {"level":"error","provider":"file","file":"./fixtures/dockerhub.yml","img_name":"docker.io/crazymax/nextcloud:latest","time":"2023-08-07T19:37:18Z","message":"unknown sort tags type \"\""}
#16 2.184 {"level":"error","provider":"file","file":"./fixtures/dockerhub.yml","img_name":"alpine","time":"2023-08-07T19:37:18Z","message":"unknown sort tags type \"\""}
#16 2.184 {"level":"error","provider":"file","file":"./fixtures/dockerhub.yml","img_name":"docker.io/graylog/graylog:3.2.0","time":"2023-08-07T19:37:18Z","message":"unknown sort tags type \"\""}
#16 2.184 {"level":"error","provider":"file","file":"./fixtures/dockerhub.yml","img_name":"jacobalberty/unifi:5.9","time":"2023-08-07T19:37:18Z","message":"unknown sort tags type \"\""}
#16 2.184 {"level":"error","provider":"file","file":"./fixtures/dockerhub.yml","img_name":"crazymax/ddns-route53","time":"2023-08-07T19:37:18Z","message":"unknown sort tags type \"\""}
#16 2.184 {"level":"info","provider":"file","time":"2023-08-07T19:37:18Z","message":"Found 8 image(s) to analyze"}
#16 2.184 --- PASS: TestDefaultImageOptions (0.00s)
#16 2.184 PASS
#16 2.184 	github.com/crazy-max/diun/v4/internal/provider/file	coverage: 75.4% of statements
#16 2.184 ok  	github.com/crazy-max/diun/v4/internal/provider/file	0.041s	coverage: 75.4% of statements
#16 2.599 ?   	github.com/crazy-max/diun/v4/internal/provider/swarm	[no test files]
#16 2.599 ?   	github.com/crazy-max/diun/v4/pb	[no test files]
#16 2.599 ?   	github.com/crazy-max/diun/v4/pkg/docker	[no test files]
#16 2.638 === RUN   TestParseServiceTags
#16 2.638 === RUN   TestParseServiceTags/noequal
#16 2.638 === RUN   TestParseServiceTags/emptyequal=
#16 2.638 === RUN   TestParseServiceTags/key=value
#16 2.638 === RUN   TestParseServiceTags/withequal=a=b
#16 2.638 --- PASS: TestParseServiceTags (0.00s)
#16 2.638     --- PASS: TestParseServiceTags/noequal (0.00s)
#16 2.638     --- PASS: TestParseServiceTags/emptyequal= (0.00s)
#16 2.638     --- PASS: TestParseServiceTags/key=value (0.00s)
#16 2.638     --- PASS: TestParseServiceTags/withequal=a=b (0.00s)
#16 2.638 PASS
#16 2.638 	github.com/crazy-max/diun/v4/internal/provider/nomad	coverage: 10.8% of statements
#16 2.638 ok  	github.com/crazy-max/diun/v4/internal/provider/nomad	0.038s	coverage: 10.8% of statements
#16 2.788 ?   	github.com/crazy-max/diun/v4/pkg/k8s	[no test files]
#16 2.813 === RUN   TestNew
#16 2.813 --- PASS: TestNew (0.00s)
#16 2.813 === RUN   TestLoadFile
#16 2.813 === RUN   TestLoadFile/Failed_on_non-existing_file
#16 2.813 Cannot read Dockerfile : open : no such file or directory
#16 2.813 === RUN   TestLoadFile/Fail_on_empty_file
#16 2.813 Cannot parse Dockerfile ./fixtures/empty.Dockerfile: file with no instructions
#16 2.813 === RUN   TestLoadFile/Fail_on_wrong_file_format
#16 2.813 Cannot parse stages for Dockerfile ./fixtures/invalid.Dockerfile: dockerfile parse error on line 1: unknown instruction: invalid
#16 2.813 === RUN   TestLoadFile/Valid
#16 2.813 --- PASS: TestLoadFile (0.00s)
#16 2.813     --- PASS: TestLoadFile/Failed_on_non-existing_file (0.00s)
#16 2.813     --- PASS: TestLoadFile/Fail_on_empty_file (0.00s)
#16 2.813     --- PASS: TestLoadFile/Fail_on_wrong_file_format (0.00s)
#16 2.813     --- PASS: TestLoadFile/Valid (0.00s)
#16 2.813 === RUN   TestFromImages
#16 2.813 --- PASS: TestFromImages (0.00s)
#16 2.813 PASS
#16 2.813 	github.com/crazy-max/diun/v4/pkg/dockerfile	coverage: 84.3% of statements
#16 2.813 ok  	github.com/crazy-max/diun/v4/pkg/dockerfile	0.024s	coverage: 84.3% of statements
#16 3.229 ?   	github.com/crazy-max/diun/v4/pkg/utl	[no test files]
#16 69.35 === RUN   TestParseImage
#16 69.35 --- PASS: TestParseImage (0.00s)
#16 69.35 === RUN   TestHubLink
#16 69.35 === RUN   TestHubLink/bintray_artifactory-oss
#16 69.35 === RUN   TestHubLink/bintray_kubexray
#16 69.35 === RUN   TestHubLink/bintray_xray-server
#16 69.35 === RUN   TestHubLink/dockerhub_alpine
#16 69.35 === RUN   TestHubLink/dockerhub_crazymax/nextcloud
#16 69.35 === RUN   TestHubLink/gcr_busybox
#16 69.35 === RUN   TestHubLink/github_ddns-route53
#16 69.35 === RUN   TestHubLink/gitlab_meltano
#16 69.35 === RUN   TestHubLink/quay_hypercube
#16 69.35 === RUN   TestHubLink/ghcr_ddns-route53
#16 69.35 === RUN   TestHubLink/ghcr_radarr
#16 69.35 === RUN   TestHubLink/redhat_etcd
#16 69.35 === RUN   TestHubLink/private
#16 69.35 --- PASS: TestHubLink (0.00s)
#16 69.35     --- PASS: TestHubLink/bintray_artifactory-oss (0.00s)
#16 69.35     --- PASS: TestHubLink/bintray_kubexray (0.00s)
#16 69.35     --- PASS: TestHubLink/bintray_xray-server (0.00s)
#16 69.35     --- PASS: TestHubLink/dockerhub_alpine (0.00s)
#16 69.35     --- PASS: TestHubLink/dockerhub_crazymax/nextcloud (0.00s)
#16 69.35     --- PASS: TestHubLink/gcr_busybox (0.00s)
#16 69.35     --- PASS: TestHubLink/github_ddns-route53 (0.00s)
#16 69.35     --- PASS: TestHubLink/gitlab_meltano (0.00s)
#16 69.35     --- PASS: TestHubLink/quay_hypercube (0.00s)
#16 69.35     --- PASS: TestHubLink/ghcr_ddns-route53 (0.00s)
#16 69.35     --- PASS: TestHubLink/ghcr_radarr (0.00s)
#16 69.35     --- PASS: TestHubLink/redhat_etcd (0.00s)
#16 69.35     --- PASS: TestHubLink/private (0.00s)
#16 69.35 === RUN   TestCompareDigest
#16 69.35 --- PASS: TestCompareDigest (6.63s)
#16 69.35 === RUN   TestManifest
#16 69.35 --- PASS: TestManifest (6.62s)
#16 69.35 === RUN   TestManifestMultiUpdatedPlatform
#16 69.35 --- PASS: TestManifestMultiUpdatedPlatform (15.35s)
#16 69.35 === RUN   TestManifestMultiNotUpdatedPlatform
#16 69.35 --- PASS: TestManifestMultiNotUpdatedPlatform (15.45s)
#16 69.35 === RUN   TestManifestVariant
#16 69.35 --- PASS: TestManifestVariant (15.47s)
#16 69.35 === RUN   TestParseReference
#16 69.35 === RUN   TestParseReference/busybox
#16 69.35 === RUN   TestParseReference///busybox:notlatest
#16 69.35 === RUN   TestParseReference///busybox@sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
#16 69.35 === RUN   TestParseReference///busybox
#16 69.35 === RUN   TestParseReference///busybox:latest@sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
#16 69.35 === RUN   TestParseReference///docker.io/library/busybox:latest
#16 69.35 === RUN   TestParseReference///UPPERCASEISINVALID
#16 69.35 --- PASS: TestParseReference (0.00s)
#16 69.35     --- PASS: TestParseReference/busybox (0.00s)
#16 69.35     --- PASS: TestParseReference///busybox:notlatest (0.00s)
#16 69.35     --- PASS: TestParseReference///busybox@sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef (0.00s)
#16 69.35     --- PASS: TestParseReference///busybox (0.00s)
#16 69.35     --- PASS: TestParseReference///busybox:latest@sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef (0.00s)
#16 69.35     --- PASS: TestParseReference///docker.io/library/busybox:latest (0.00s)
#16 69.35     --- PASS: TestParseReference///UPPERCASEISINVALID (0.00s)
#16 69.35 === RUN   TestNew
#16 69.35 --- PASS: TestNew (0.00s)
#16 69.35 === RUN   TestTags
#16 69.35 --- PASS: TestTags (6.55s)
#16 69.35 === RUN   TestTagsSort
#16 69.35 === RUN   TestTagsSort/sort_default
#16 69.35 === RUN   TestTagsSort/sort_lexicographical
#16 69.35 === RUN   TestTagsSort/sort_reverse
#16 69.35 === RUN   TestTagsSort/sort_semver
#16 69.35 --- PASS: TestTagsSort (0.00s)
#16 69.35     --- PASS: TestTagsSort/sort_default (0.00s)
#16 69.35     --- PASS: TestTagsSort/sort_lexicographical (0.00s)
#16 69.35     --- PASS: TestTagsSort/sort_reverse (0.00s)
#16 69.35     --- PASS: TestTagsSort/sort_semver (0.00s)
#16 69.35 PASS
#16 69.35 	github.com/crazy-max/diun/v4/pkg/registry	coverage: 77.2% of statements
#16 69.35 ok  	github.com/crazy-max/diun/v4/pkg/registry	66.116s	coverage: 77.2% of statements
#16 69.38 + go tool cover '-func=/tmp/coverage.txt'
#16 69.55 github.com/crazy-max/diun/v4/internal/config/config.go:25:		Load			93.8%
#16 69.55 github.com/crazy-max/diun/v4/internal/config/config.go:64:		validate		100.0%
#16 69.55 github.com/crazy-max/diun/v4/internal/config/config.go:83:		String			100.0%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/common.go:21:		ValidateImage		37.7%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/common.go:113:		validateMetadataKey	0.0%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/file/file.go:19:		New			100.0%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/file/file.go:30:		ListJob			72.7%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/file/image.go:14:	listFileImage		77.4%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/file/image.go:90:	getFiles		71.4%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/nomad/nomad.go:19:	New			0.0%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/nomad/nomad.go:30:	ListJob			0.0%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/nomad/task.go:12:	ParseServiceTags	100.0%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/nomad/task.go:27:	updateMap		0.0%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/nomad/task.go:35:	listTaskImages		0.0%
#16 69.55 github.com/crazy-max/diun/v4/internal/provider/nomad/task.go:130:	metadata		0.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/dockerfile/client.go:27:		New			100.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/dockerfile/client.go:62:		isStageName		75.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/dockerfile/client.go:71:		metaArgsToMap		100.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/dockerfile/image.go:20:		has			75.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/dockerfile/image.go:30:		FromImages		78.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/image.go:33:			Name			0.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/image.go:38:			String			100.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/image.go:43:			Reference		0.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/image.go:52:			WithDigest		0.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/image.go:59:			ParseImage		76.9%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/image.go:94:			hubLink			91.7%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/manifest.go:29:		Manifest		78.6%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/manifest.go:110:		isManifestList		100.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/manifest.go:114:		isManifestList		100.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/ref.go:11:			ParseReference		100.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/registry.go:29:		New			100.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/registry.go:44:		timeoutContext		80.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/tags.go:27:			Tags			66.7%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/tags_sort.go:13:		SortTags		100.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/tags_sort.go:74:		Valid			0.0%
#16 69.55 github.com/crazy-max/diun/v4/pkg/registry/tags_sort.go:79:		OneOf			0.0%
#16 69.55 total:									(statements)		63.6%
#16 DONE 69.6s

#17 [test-coverage 1/1] COPY --from=test /tmp/coverage.txt /coverage.txt
#17 CACHED

#18 exporting to client
#18 copying files 22.84kB done
#18 DONE 0.0s

Additional info

A couple mitigations:

  1. Lowest effort, run slow tests in parallel
  2. Highest effort, mock HTTP requests

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions