Relax description validation
Description should not be mandatory when defining a github endpoint. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
001465d0a2
commit
beafcb6316
2 changed files with 0 additions and 12 deletions
|
|
@ -358,9 +358,6 @@ func (g *Github) Validate() error {
|
|||
if g.Name == "" {
|
||||
return fmt.Errorf("missing credentials name")
|
||||
}
|
||||
if g.Description == "" {
|
||||
return fmt.Errorf("missing credentials description")
|
||||
}
|
||||
|
||||
if g.APIBaseURL != "" {
|
||||
if _, err := url.ParseRequestURI(g.APIBaseURL); err != nil {
|
||||
|
|
|
|||
|
|
@ -667,15 +667,6 @@ func TestGithubConfig(t *testing.T) {
|
|||
},
|
||||
errString: "missing credentials name",
|
||||
},
|
||||
{
|
||||
name: "Description is empty",
|
||||
cfg: Github{
|
||||
Name: "dummy_creds",
|
||||
Description: "",
|
||||
OAuth2Token: "bogus",
|
||||
},
|
||||
errString: "missing credentials description",
|
||||
},
|
||||
{
|
||||
name: "OAuth token is set in the PAT section",
|
||||
cfg: Github{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue