Skip to content

Commit c1b538e

Browse files
Balijepalli Vamshi KrishnaBalijepalli Vamshi Krishna
authored andcommitted
add more test cases
1 parent 79ea5e8 commit c1b538e

File tree

2 files changed

+12
-80
lines changed

2 files changed

+12
-80
lines changed

remediation/workflow/pin/pinactions_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -283,19 +283,19 @@ func TestPinActions(t *testing.T) {
283283
exemptedActions []string
284284
pinToImmutable bool
285285
}{
286-
// {fileName: "alreadypinned.yml", wantUpdated: false, pinToImmutable: true},
287-
// {fileName: "branch.yml", wantUpdated: true, pinToImmutable: true},
288-
// {fileName: "localaction.yml", wantUpdated: true, pinToImmutable: true},
289-
// {fileName: "multiplejobs.yml", wantUpdated: true, pinToImmutable: true},
290-
// {fileName: "basic.yml", wantUpdated: true, pinToImmutable: true},
291-
// {fileName: "dockeraction.yml", wantUpdated: true, pinToImmutable: true},
292-
// {fileName: "multipleactions.yml", wantUpdated: true, pinToImmutable: true},
293-
// {fileName: "actionwithcomment.yml", wantUpdated: true, pinToImmutable: true},
294-
// {fileName: "repeatedactionwithcomment.yml", wantUpdated: true, pinToImmutable: true},
295-
// {fileName: "immutableaction-1.yml", wantUpdated: true, pinToImmutable: true},
286+
{fileName: "alreadypinned.yml", wantUpdated: false, pinToImmutable: true},
287+
{fileName: "branch.yml", wantUpdated: true, pinToImmutable: true},
288+
{fileName: "localaction.yml", wantUpdated: true, pinToImmutable: true},
289+
{fileName: "multiplejobs.yml", wantUpdated: true, pinToImmutable: true},
290+
{fileName: "basic.yml", wantUpdated: true, pinToImmutable: true},
291+
{fileName: "dockeraction.yml", wantUpdated: true, pinToImmutable: true},
292+
{fileName: "multipleactions.yml", wantUpdated: true, pinToImmutable: true},
293+
{fileName: "actionwithcomment.yml", wantUpdated: true, pinToImmutable: true},
294+
{fileName: "repeatedactionwithcomment.yml", wantUpdated: true, pinToImmutable: true},
295+
{fileName: "immutableaction-1.yml", wantUpdated: true, pinToImmutable: true},
296296
{fileName: "exemptaction.yml", wantUpdated: true, exemptedActions: []string{"actions/checkout", "rohith/*", "praveen/*", "aman-*/*", "*/seperate*"}, pinToImmutable: true},
297-
// {fileName: "donotpintoimmutable.yml", wantUpdated: true, pinToImmutable: false},
298-
// {fileName: "invertedcommas.yml", wantUpdated: true, pinToImmutable: false},
297+
{fileName: "donotpintoimmutable.yml", wantUpdated: true, pinToImmutable: false},
298+
{fileName: "invertedcommas.yml", wantUpdated: true, pinToImmutable: false},
299299
}
300300
for _, tt := range tests {
301301
input, err := ioutil.ReadFile(path.Join(inputDirectory, tt.fileName))

testfiles/pinactions/output/exemptaction.yml.failed

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)