@@ -667,8 +667,8 @@ func TestManifestActions(t *testing.T) {
667667 wantErr bool
668668 }
669669
670- testCases := [ ]TestCase {
671- {
670+ testCases := map [ string ]TestCase {
671+ "root manifest without transitive actions" : {
672672 fs : map [string ]mockFsEntry {
673673 "action.yml" : {
674674 Content : []byte (manifestWithNoSteps ),
@@ -677,7 +677,7 @@ func TestManifestActions(t *testing.T) {
677677 path : "" ,
678678 wantErr : false ,
679679 },
680- {
680+ "root manifest with transitive actions" : {
681681 fs : map [string ]mockFsEntry {
682682 "action.yml" : {
683683 Content : []byte (manifestWithStep ),
@@ -686,7 +686,7 @@ func TestManifestActions(t *testing.T) {
686686 path : "" ,
687687 wantErr : false ,
688688 },
689- {
689+ "root manifest using nested actions" : {
690690 fs : map [string ]mockFsEntry {
691691 "action.yml" : {
692692 Content : []byte (manifestWithNestedActions ),
@@ -695,7 +695,7 @@ func TestManifestActions(t *testing.T) {
695695 path : "" ,
696696 wantErr : false ,
697697 },
698- {
698+ "nested .yml manifest" : {
699699 fs : map [string ]mockFsEntry {
700700 "nested" : {
701701 Dir : true ,
@@ -709,7 +709,7 @@ func TestManifestActions(t *testing.T) {
709709 path : "nested" ,
710710 wantErr : false ,
711711 },
712- {
712+ "root .yaml manifest" : {
713713 fs : map [string ]mockFsEntry {
714714 "action.yaml" : {
715715 Content : []byte (manifestWithStep ),
@@ -718,7 +718,7 @@ func TestManifestActions(t *testing.T) {
718718 path : "" ,
719719 wantErr : false ,
720720 },
721- {
721+ "nested .yaml manifest" : {
722722 fs : map [string ]mockFsEntry {
723723 "nested" : {
724724 Dir : true ,
@@ -732,7 +732,30 @@ func TestManifestActions(t *testing.T) {
732732 path : "nested" ,
733733 wantErr : false ,
734734 },
735- {
735+ "root Dockerfile manifest" : {
736+ fs : map [string ]mockFsEntry {
737+ "Dockerfile" : {
738+ Content : []byte (manifestDockerfile ),
739+ },
740+ },
741+ path : "" ,
742+ wantErr : false ,
743+ },
744+ "nested Dockerfile manifest" : {
745+ fs : map [string ]mockFsEntry {
746+ "nested" : {
747+ Dir : true ,
748+ Children : map [string ]mockFsEntry {
749+ "Dockerfile" : {
750+ Content : []byte (manifestDockerfile ),
751+ },
752+ },
753+ },
754+ },
755+ path : "nested" ,
756+ wantErr : false ,
757+ },
758+ "manifest with syntax error" : {
736759 fs : map [string ]mockFsEntry {
737760 "action.yml" : {
738761 Content : []byte (yamlWithSyntaxError ),
@@ -741,7 +764,7 @@ func TestManifestActions(t *testing.T) {
741764 path : "" ,
742765 wantErr : true ,
743766 },
744- {
767+ "manifest with invalid uses value" : {
745768 fs : map [string ]mockFsEntry {
746769 "action.yml" : {
747770 Content : []byte (manifestWithInvalidUses ),
@@ -750,15 +773,15 @@ func TestManifestActions(t *testing.T) {
750773 path : "" ,
751774 wantErr : true ,
752775 },
753- {
776+ "empty repo" : {
754777 fs : map [string ]mockFsEntry {},
755778 path : "" ,
756779 wantErr : true ,
757780 },
758781 }
759782
760- for i , tt := range testCases {
761- t .Run (fmt . Sprintf ( "#%d" , i ) , func (t * testing.T ) {
783+ for name , tt := range testCases {
784+ t .Run (name , func (t * testing.T ) {
762785 t .Parallel ()
763786
764787 repo , err := mockRepo (tt .fs )
0 commit comments