Add Identifier to actions.Client (#2237)

This commit is contained in:
Francesco Renzi
2023-02-01 13:47:54 +00:00
committed by GitHub
parent 34efb9d585
commit 7414dc6568
5 changed files with 197 additions and 171 deletions

View File

@@ -91,18 +91,19 @@ func TestGitHubConfig(t *testing.T) {
}
})
t.Run("when given an invalid URL", func(t *testing.T) {})
invalidURLs := []string{
"https://github.com/",
"https://github.com",
"https://github.com/some/random/path",
}
t.Run("when given an invalid URL", func(t *testing.T) {
invalidURLs := []string{
"https://github.com/",
"https://github.com",
"https://github.com/some/random/path",
}
for _, u := range invalidURLs {
_, err := actions.ParseGitHubConfigFromURL(u)
require.Error(t, err)
assert.True(t, errors.Is(err, actions.ErrInvalidGitHubConfigURL))
}
for _, u := range invalidURLs {
_, err := actions.ParseGitHubConfigFromURL(u)
require.Error(t, err)
assert.True(t, errors.Is(err, actions.ErrInvalidGitHubConfigURL))
}
})
}
func TestGitHubConfig_GitHubAPIURL(t *testing.T) {