SCM: github.com
CI: travis
Scanner: travis addon sonar scanner
Language: go 1.13.x
sonar-project.properties
sonar.projectKey=my-project-key
sonar.projectName=my-project-name
sonar.exclusions=**/*_test.go,**/*_generated*.go,**/*_generated/**,**/vendor/**
sonar.test.inclusions=**/*_test.go
sonar.test.exclusions=**/*_generated*.go,**/*_generated/**,**/vendor/**
sonar.go.tests.reportPaths=report.json
sonar.go.coverage.reportPaths=coverage.out
Snippet from .travis.yml
- stage: sonar
name: "Run SonarCloud Analysis"
script:
- go test -coverprofile=coverage.out ./...
- go test -json ./... > report.json
- cat report.json
- sonar-scanner
The first two lines in the script run successfully and the code coverage report is loaded successfully.
I uploaded the report.json output as report.txt:
report.txt (94.4 KB)
This is the first few lines of the output of sonar-scanner
:
$ sonar-scanner
INFO: Scanner configuration file: /home/travis/.sonarscanner/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /home/travis/gopath/src/github.com/open-cluster-management/multicloud-operators-cluster-controller/sonar-project.properties
INFO: SonarQube Scanner 3.0.3.778
INFO: Java 1.8.0_151 Oracle Corporation (64-bit)
INFO: Linux 4.4.0-101-generic amd64
INFO: User cache: /home/travis/.sonar/cache
INFO: SonarQube server 8.0.0
INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=689ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /home/travis/.sonar/cache
These are the lines that show the output for the Go analysis which indicates that it can’t load the test execution report:
INFO: Sensor SonarGo [go]
INFO: 35 source files to be analyzed
INFO: 35/35 source files have been analyzed
INFO: Sensor SonarGo [go] (done) | time=967ms
INFO: Sensor Go Unit Test Report [go]
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/clusterimport and test Test_bootstrapServiceAccountNsN/nil_EndpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/clusterimport and test Test_bootstrapServiceAccountNsN/empty_EndpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/clusterimport and test Test_bootstrapServiceAccountNsN/good_EndpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/clusterimport and test Test_bootstrapServiceAccountNsN
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test TestReconcileClusterDeployment_Reconcile/ClusterDeployment_DNE
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test TestReconcileClusterDeployment_Reconcile/Only_ClusterDeployment
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test TestReconcileClusterDeployment_Reconcile/ClusterDeployment_&_EndpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test TestReconcileClusterDeployment_Reconcile/ClusterDeployment_&_EndpointConfig_with_ImagePullSecret
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test TestReconcileClusterDeployment_Reconcile
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_clusterRegistryNsN/null_cluster_deployment
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_clusterRegistryNsN/empty_cluster_deployment
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_clusterRegistryNsN/success
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_clusterRegistryNsN
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_getClusterRegistryCluster/empty_clusterDeployment
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_getClusterRegistryCluster/client_error
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_getClusterRegistryCluster/success
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_getClusterRegistryCluster
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_newClusterRegistryCluster/empty_clusterDeployment
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_newClusterRegistryCluster/success
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_newClusterRegistryCluster
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_createClusterRegistryCluster/nil_clusterDeployment
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_createClusterRegistryCluster/success
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterdeployment and test Test_createClusterRegistryCluster
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_bootstrapServiceAccountNsN/nil_cluster
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_bootstrapServiceAccountNsN/empty_cluster.Name
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_bootstrapServiceAccountNsN/success
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_bootstrapServiceAccountNsN
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_NewBootstrapServiceAccount/nil_cluster
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_NewBootstrapServiceAccount/success
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_NewBootstrapServiceAccount
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_getBootstrapServiceAccount/empty_cluster_registry_object
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_getBootstrapServiceAccount/SA_does_not_exist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_getBootstrapServiceAccount/success
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_getBootstrapServiceAccount
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_createBootstrapServiceAccount/SA_already_exists
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_createBootstrapServiceAccount/empty_cluster_registry_object
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_createBootstrapServiceAccount/success
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/clusterregistry and test Test_createBootstrapServiceAccount
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_clusterRegistryNsN/nil_EndpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_clusterRegistryNsN/empty_EndpointConfig.Spec.ClusterName
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_clusterRegistryNsN/empty_EndpointConfig.Spec.ClusterNamespace
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_clusterRegistryNsN/no_error
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_clusterRegistryNsN
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_getClusterRegistryCluster/nil_EndpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_getClusterRegistryCluster/cluster_does_not_exist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_getClusterRegistryCluster/cluster_exist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_getClusterRegistryCluster
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_clusterReconcileMapper_Map/green
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_clusterReconcileMapper_Map
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test TestReconcileEndpointConfig_Reconcile/endpointConfig_do_not_exist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test TestReconcileEndpointConfig_Reconcile/terminating_endpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test TestReconcileEndpointConfig_Reconcile/invalid_endpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test TestReconcileEndpointConfig_Reconcile/cluster_does_not_exist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test TestReconcileEndpointConfig_Reconcile/missing_resource_to_generate_secret
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test TestReconcileEndpointConfig_Reconcile/success
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test TestReconcileEndpointConfig_Reconcile
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_importSecretNsN/nil_EndpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_importSecretNsN/empty_EndpointConfig.Spec.ClusterName
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_importSecretNsN/empty_EndpointConfig.Spec.ClusterNamespace
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_importSecretNsN/no_error
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_importSecretNsN
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_getImportSecret/nil_EndpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_getImportSecret/secret_does_not_exist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_getImportSecret/secret_does_exist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_getImportSecret
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_newImportSecret/nil_scheme
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_newImportSecret/nil_endpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_newImportSecret/empty_endpointConfig
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_newImportSecret/no_error
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_newImportSecret
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_createImportSecret/no_error
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_createImportSecret/secret_already_exist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_createImportSecret
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/controller/endpointconfig and test Test_toYAML
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestUniqueStringSlice
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestRemoveFromStringSlice
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestAppendIfDNE
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestFileExist/exist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestFileExist/dne
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestFileExist
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestAddFinalizer/add
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestAddFinalizer/don't_add
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestAddFinalizer
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestRemoveFinalizer/don't_remove
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestRemoveFinalizer/remove
WARN: Failed to find test file for package github.com/open-cluster-management/multicloud-operators-cluster-controller/pkg/utils and test TestRemoveFinalizer
INFO: Sensor Go Unit Test Report [go] (done) | time=71ms
INFO: Sensor Go Cover sensor for Go coverage [go]
INFO: Load coverage report from '/home/travis/gopath/src/github.com/open-cluster-management/multicloud-operators-cluster-controller/coverage.out'
INFO: Sensor Go Cover sensor for Go coverage [go] (done) | time=112ms