TestIsGhAwNativeAction verifies that isGhAwNativeAction correctly identifies gh-aw native action repos and excludes non-native repos.
(t *testing.T)
| 737 | // TestIsGhAwNativeAction verifies that isGhAwNativeAction correctly identifies gh-aw |
| 738 | // native action repos and excludes non-native repos. |
| 739 | func TestIsGhAwNativeAction(t *testing.T) { |
| 740 | tests := []struct { |
| 741 | repo string |
| 742 | want bool |
| 743 | }{ |
| 744 | {"github/gh-aw-actions/setup", true}, |
| 745 | {"github/gh-aw/actions/setup", true}, |
| 746 | {"github/gh-aw/actions/setup-cli", true}, |
| 747 | {"actions/checkout", false}, |
| 748 | {"actions/setup-node", false}, |
| 749 | {"docker/login-action", false}, |
| 750 | {"github/codeql-action/upload-sarif", false}, |
| 751 | } |
| 752 | for _, tt := range tests { |
| 753 | t.Run(tt.repo, func(t *testing.T) { |
| 754 | got := isGhAwNativeAction(tt.repo) |
| 755 | if got != tt.want { |
| 756 | t.Errorf("isGhAwNativeAction(%q) = %v, want %v", tt.repo, got, tt.want) |
| 757 | } |
| 758 | }) |
| 759 | } |
| 760 | } |
| 761 | |
| 762 | // TestUpdateActions_NeverDowngrades verifies that UpdateActions never replaces an action |
| 763 | // with an older version. This can happen when an action has tags that were not published |
nothing calls this directly
no test coverage detected