Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/cli/update_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func TestResolveLatestRef_TagIntegration(t *testing.T) {

// Use a well-known public repo with releases
// actions/checkout has many tagged releases (v3.x, v4.x, etc.)
latestRef, err := resolveLatestRef(context.Background(), "actions/checkout", "v4.0.0", false, true)
latestRef, err := resolveLatestRef(context.Background(), "actions/checkout", "v4.0.0", false, true, 0)
require.NoError(t, err, "Should resolve latest release for actions/checkout v4.x")

// The resolved ref should be a newer v4.x tag
Expand All @@ -115,7 +115,7 @@ func TestResolveLatestRef_TagMajorUpdateIntegration(t *testing.T) {
skipWithoutGitHubAuth(t)

// With allowMajor=true, it should resolve to the latest release across all major versions
latestRef, err := resolveLatestRef(context.Background(), "actions/checkout", "v3.0.0", true, true)
latestRef, err := resolveLatestRef(context.Background(), "actions/checkout", "v3.0.0", true, true, 0)
require.NoError(t, err, "Should resolve latest release with major updates allowed")

assert.True(t, isSemanticVersionTag(latestRef), "Resolved ref should be a semantic version tag, got: %s", latestRef)
Expand All @@ -128,7 +128,7 @@ func TestResolveLatestRef_BranchIntegration(t *testing.T) {
skipWithoutGitHubAuth(t)

// Use a well-known branch on a public repo
latestRef, err := resolveLatestRef(context.Background(), "actions/checkout", "main", false, true)
latestRef, err := resolveLatestRef(context.Background(), "actions/checkout", "main", false, true, 0)
require.NoError(t, err, "Should resolve latest commit for branch 'main'")

// The result should be a 40-char commit SHA
Expand All @@ -144,7 +144,7 @@ func TestResolveLatestRef_CommitSHAIntegration(t *testing.T) {
// This is an older commit — the resolution should return the latest commit on the default branch
oldSHA := "f43a0e5ff2bd294095638e18286ca9a3d1956744" // Known old commit

latestRef, err := resolveLatestRef(context.Background(), "actions/checkout", oldSHA, false, true)
latestRef, err := resolveLatestRef(context.Background(), "actions/checkout", oldSHA, false, true, 0)
require.NoError(t, err, "Should resolve latest commit from default branch")

// The result should be a 40-char commit SHA (the latest on main)
Expand Down
Loading