-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add validate-config command (#90)
- Loading branch information
1 parent
8c650dd
commit 128cc2c
Showing
10 changed files
with
274 additions
and
4 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
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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package types | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestExplorerDisplayWarningsNoProposalsLinkPattern(t *testing.T) { | ||
t.Parallel() | ||
|
||
explorer := &Explorer{WalletLinkPattern: "test"} | ||
warnings := explorer.DisplayWarnings("test") | ||
assert.Len(t, warnings, 1) | ||
} | ||
|
||
func TestExplorerDisplayWarningsNoWalletLinkPattern(t *testing.T) { | ||
t.Parallel() | ||
|
||
explorer := &Explorer{ProposalLinkPattern: "test"} | ||
warnings := explorer.DisplayWarnings("test") | ||
assert.Len(t, warnings, 1) | ||
} | ||
|
||
func TestExplorerDisplayWarningsOk(t *testing.T) { | ||
t.Parallel() | ||
|
||
explorer := &Explorer{ProposalLinkPattern: "test", WalletLinkPattern: "test"} | ||
warnings := explorer.DisplayWarnings("test") | ||
assert.Empty(t, warnings) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package types | ||
|
||
type Warning struct { | ||
Message string | ||
Labels map[string]string | ||
} |