Skip to content

Commit d23716e

Browse files
authored
Remove TestGetActionPinSemverPreference test (#16084)
1 parent d635c2b commit d23716e

1 file changed

Lines changed: 0 additions & 55 deletions

File tree

pkg/workflow/action_pins_test.go

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -533,61 +533,6 @@ func TestApplyActionPinToTypedStep_Immutability(t *testing.T) {
533533
}
534534
}
535535

536-
// TestGetActionPinSemverPreference verifies that when multiple versions exist for the same repo,
537-
// the latest version by semver is returned
538-
func TestGetActionPinSemverPreference(t *testing.T) {
539-
tests := []struct {
540-
name string
541-
repo string
542-
expectedVersion string
543-
}{
544-
{
545-
name: "setup-go prefers v6.2.0 over v6",
546-
repo: "actions/setup-go",
547-
expectedVersion: "v6.2.0",
548-
},
549-
{
550-
name: "setup-node prefers v6.2.0 over v6",
551-
repo: "actions/setup-node",
552-
expectedVersion: "v6.2.0",
553-
},
554-
{
555-
name: "upload-artifact prefers v6.0.0 over v5 and v4",
556-
repo: "actions/upload-artifact",
557-
expectedVersion: "v6.0.0",
558-
},
559-
{
560-
name: "setup-python prefers v5.6.0 over v5",
561-
repo: "actions/setup-python",
562-
expectedVersion: "v5.6.0",
563-
},
564-
{
565-
name: "cache prefers v4.3.0 over v4",
566-
repo: "actions/cache",
567-
expectedVersion: "v4.3.0",
568-
},
569-
}
570-
571-
for _, tt := range tests {
572-
t.Run(tt.name, func(t *testing.T) {
573-
// Test GetActionPin
574-
result := GetActionPin(tt.repo)
575-
if !strings.Contains(result, "# "+tt.expectedVersion) {
576-
t.Errorf("GetActionPin(%s) = %s, expected version %s", tt.repo, result, tt.expectedVersion)
577-
}
578-
579-
// Test GetActionPinByRepo
580-
pin, exists := GetActionPinByRepo(tt.repo)
581-
if !exists {
582-
t.Fatalf("GetActionPinByRepo(%s) returned false, expected true", tt.repo)
583-
}
584-
if pin.Version != tt.expectedVersion {
585-
t.Errorf("GetActionPinByRepo(%s).Version = %s, expected %s", tt.repo, pin.Version, tt.expectedVersion)
586-
}
587-
})
588-
}
589-
}
590-
591536
// TestGetActionPinWithData_SemverPreference tests that GetActionPinWithData
592537
// resolves actions using the exact version tag specified, and only falls back
593538
// to compatible versions when the exact tag doesn't exist in hardcoded pins

0 commit comments

Comments
 (0)