MCPcopy Create free account
hub / github.com/monitoror/monitoror / initRepository

Function initRepository

monitorables/github/api/repository/api_test.go:18–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16)
17
18func initRepository(t *testing.T) *githubRepository {
19 conf := &config.Github{
20 URL: "https://github.example.com",
21 Token: "xxx",
22 Timeout: 1000,
23 CountCacheExpiration: 10000,
24 }
25
26 repository := NewGithubRepository(conf)
27
28 assert.Equal(t, "https://github.example.com/", conf.URL)
29
30 apiGithubRepository, ok := repository.(*githubRepository)
31 if assert.True(t, ok) {
32 return apiGithubRepository
33 }
34 return nil
35}
36
37func TestRepository_GetSearchCount_Error(t *testing.T) {
38 githubErr := errors.New("github error")

Calls 1

NewGithubRepositoryFunction · 0.85

Tested by

no test coverage detected