• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dhui / dktest / 14664446825
67%
master: 59%

Build:
Build:
LAST BUILD BRANCH: go_1.25
DEFAULT BRANCH: master
Ran 25 Apr 2025 12:21PM UTC
Jobs 2
Files 7
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Apr 2025 12:16PM UTC coverage: 66.59% (+0.2%) from 66.359%
14664446825

Pull #42

github

wybczu
feat: pass registry auth option to `imagePull` func

This will allow to pull images from authed docker registries. An example for
Google Cloud Artifact Registry:

```go
func Example_artifact_registry_auth() {
	dockerImageName := "us-docker.pkg.dev/GOOGLE_CLOUD_PROJECT/REGISTRY/image:latest"

	ctx := context.Background()

	// using github.com/google/go-containerregistry/pkg/v1/google
	authenticator, err := google.NewEnvAuthenticator(ctx)
	if err != nil {
		panic(err)
	}

	authConfig, err := authenticator.Authorization()
	if err != nil {
		panic(err)
	}

	authConfigJSON, err := authConfig.MarshalJSON()
	if err != nil {
		panic(err)
	}

	pullRegistryAuth := base64.StdEncoding.EncodeToString(authConfigJSON)

	opts := dktest.Options{
		PortRequired:     true,
		ReadyFunc:        func(ctx context.Context, c dktest.ContainerInfo) bool { return true },
		LogStderr:        true,
		LogStdout:        true,
		PullRegistryAuth: pullRegistryAuth,
	}

	dktest.Run(&testing.T{}, dockerImageName, opts, func(t *testing.T, c dktest.ContainerInfo) {})

	// Output:
}
```
Pull Request #42: feat: pass registry auth option to `imagePull` func

6 of 6 new or added lines in 1 file covered. (100.0%)

291 of 437 relevant lines covered (66.59%)

65.69 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Go-1.24 - 14664446825.1 25 Apr 2025 12:21PM UTC 7
59.04
GitHub Action Run
2 Go-1.23 - 14664446825.2 25 Apr 2025 12:21PM UTC 7
66.59
GitHub Action Run
Source Files on build 14664446825
  • Tree
  • List 7
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #42
  • PR Base - master (#14525492345)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc