Add a test for unauthenticated dockerhub pulls

This commit is contained in:
Bryce Lampe
2024-04-22 12:17:37 -07:00
parent da63cd4cf4
commit d72c895b59
3 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1 @@
*

View File

@@ -0,0 +1,18 @@
name: dockerhub-unauthenticated
description: Pull an image from Dockerhub without credentials
runtime: yaml
plugins:
providers:
- name: docker-build
path: ../../../bin
resources:
my-image:
type: docker-build:Image
properties:
tags:
- alpine-local
load: true
context:
location: .
dockerfile:
inline: FROM alpine

View File

@@ -58,3 +58,14 @@ func TestDockerHub(t *testing.T) {
integration.ProgramTest(t, &test)
}
func TestDockerHubUnauthenticated(t *testing.T) {
cwd, err := os.Getwd()
require.NoError(t, err)
test := integration.ProgramTestOptions{
Dir: path.Join(cwd, "tests/unauthenticated"),
}
integration.ProgramTest(t, &test)
}