-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: enable testifylint linter (#2504)
## Description Adds testifylint and fixes any issues related to it. ## Related Issue Part of #2503 Depends on #2499 ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/.github/CONTRIBUTING.md#developer-workflow) followed Signed-off-by: Austin Abro <[email protected]>
- Loading branch information
1 parent
aa46912
commit 0d4b1ad
Showing
8 changed files
with
28 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,7 @@ func TestValidateSchema(t *testing.T) { | |
"https://dev.azure.com/defenseunicorns/zarf-public-test/_git/[email protected]"}} | ||
checkForUnpinnedRepos(&validator, &composer.Node{ZarfComponent: component}) | ||
require.Equal(t, unpinnedRepo, validator.findings[0].item) | ||
require.Equal(t, len(validator.findings), 1) | ||
require.Len(t, validator.findings, 1) | ||
}) | ||
|
||
t.Run("Unpinnned image warning", func(t *testing.T) { | ||
|
@@ -133,8 +133,7 @@ func TestValidateSchema(t *testing.T) { | |
checkForUnpinnedImages(&validator, &composer.Node{ZarfComponent: component}) | ||
require.Equal(t, unpinnedImage, validator.findings[0].item) | ||
require.Equal(t, badImage, validator.findings[1].item) | ||
require.Equal(t, 2, len(validator.findings)) | ||
|
||
require.Len(t, validator.findings, 2) | ||
}) | ||
|
||
t.Run("Unpinnned file warning", func(t *testing.T) { | ||
|
@@ -156,7 +155,7 @@ func TestValidateSchema(t *testing.T) { | |
component := types.ZarfComponent{Files: zarfFiles} | ||
checkForUnpinnedFiles(&validator, &composer.Node{ZarfComponent: component}) | ||
require.Equal(t, fileURL, validator.findings[0].item) | ||
require.Equal(t, 1, len(validator.findings)) | ||
require.Len(t, validator.findings, 1) | ||
}) | ||
|
||
t.Run("Wrap standalone numbers in bracket", func(t *testing.T) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters