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

dhui / dktest
67%
master: 59%

Build:
Build:
LAST BUILD BRANCH: go_1.25
DEFAULT BRANCH: master
Repo Added 10 Feb 2021 04:17AM UTC
Files 7
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

LAST BUILD ON BRANCH luk/add-auth-support
branch: luk/add-auth-support
CHANGE BRANCH
x
Reset
  • luk/add-auth-support
  • circleci
  • dependabot/go_modules/golang.org/x/net-0.33.0
  • dependabot/go_modules/golang.org/x/net-0.38.0
  • docker-v28
  • go_1.25
  • master
  • upgrade_pkgs

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

Relevant lines Covered
Build:
Build:
437 RELEVANT LINES 291 COVERED LINES
65.69 HITS PER LINE
Source Files on luk/add-auth-support
  • Tree
  • List 7
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
14664446825 luk/add-auth-support 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... Pull #42 25 Apr 2025 12:21PM UTC wybczu github
66.59
See All Builds (123)
  • Repo on GitHub
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