1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

test(ko): fix chainguard/static labels

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2024-10-26 13:58:18 -03:00
parent 636a14721b
commit d7b2554312
No known key found for this signature in database

View File

@ -163,6 +163,7 @@ func TestPublishPipeSuccess(t *testing.T) {
"org.opencontainers.image.source": "https://github.com/chainguard-images/images/tree/main/images/static",
"org.opencontainers.image.url": "https://images.chainguard.dev/directory/image/static/overview",
"org.opencontainers.image.vendor": "Chainguard",
"org.opencontainers.image.created": ".*",
}
table := []struct {
@ -354,7 +355,12 @@ func TestPublishPipeSuccess(t *testing.T) {
require.NoError(t, err)
require.GreaterOrEqual(t, len(configFile.History), 3)
require.Equal(t, table.ExpectedLabels, configFile.Config.Labels)
require.Len(t, configFile.Config.Labels, len(table.ExpectedLabels))
for k, v := range table.ExpectedLabels {
got, ok := configFile.Config.Labels[k]
require.True(t, ok, "missing label")
require.Regexp(t, v, got)
}
var creationTime time.Time
if table.CreationTime != "" {