test(ci services): add test for travis

This commit is contained in:
Nightapes
2019-07-16 20:26:57 +02:00
parent 13afcea8a0
commit c86ad684c6
5 changed files with 95 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ type ProviderConfig struct {
//Service interface
type Service interface {
Detect() (*ProviderConfig, error)
detect() (*ProviderConfig, error)
}
//GetCIProvider get provider
@@ -33,12 +33,12 @@ func GetCIProvider(gitUtil *gitutil.GitUtil) (*ProviderConfig, error) {
}
for _, service := range services {
config, err := service.Detect()
config, err := service.detect()
if err == nil {
log.Infof("Found CI: %s", config.Name)
return config, nil
}
log.Debugf("%s", err.Error())
log.Infof("%s", err.Error())
}
return nil, fmt.Errorf("could not find any CI, if running locally set env CI=true")
}