/insights-results-aggregator

Aggregator service for insights results

Primary LanguageGoApache License 2.0Apache-2.0

Insights Results Aggregator

forthebadge made-with-go

GoDoc GitHub Pages Go Report Card Build Status Build Status codecov GitHub go.mod Go version License

Aggregator service for insights results

Description

Insights Results Aggregator is a service that provides Insight OCP data (officially called recommendations) that are being consumed by OpenShift Cluster Manager (OCM), Advanced Cluster Manager (ACM), and OCP WebConsole via Insights Operator. That data contain information about clusters status (especially health, security, performance, etc.) and recommendations based on results generated by Insights rules engine. Insights OCP data are consumed from selected broker, stored in a storage (that basically works as a cache) and exposed via REST API endpoints.

Documentation

Documentation is hosted on Github Pages https://redhatinsights.github.io/insights-results-aggregator/. Sources are located in docs.

Makefile targets

clean                Run go clean
build                Build binary containing service executable
build-cover          Build binary with code coverage detection support
fmt                  Run go fmt -w for all sources
lint                 Run golint
vet                  Run go vet. Report likely mistakes in source code
cyclo                Run gocyclo
ineffassign          Run ineffassign checker
shellcheck           Run shellcheck
errcheck             Run errcheck
goconst              Run goconst checker
gosec                Run gosec checker
abcgo                Run ABC metrics checker
json-check           Check all JSONs for basic syntax
style                Run all the formatting related commands (fmt, vet, lint, cyclo) + check shell scripts
run                  Build the project and executes the binary
test                 Run the unit tests
cover                Generate HTML pages with code coverage
coverage             Display code coverage on terminal
integration_tests    Run all integration tests
rest_api_tests       Run REST API tests
before_commit        Checks done before commit
help                 Show this help screen
function_list        List all functions in generated binary file

BDD tests

Behaviour tests for this service are included in Insights Behavioral Spec repository. In order to run these tests, the following steps need to be made:

  1. clone the Insights Behavioral Spec repository
  2. go into the cloned subdirectory insights-behavioral-spec
  3. run the aggregator_tests.sh from this subdirectory

List of all test scenarios prepared for this service is available at https://redhatinsights.github.io/insights-behavioral-spec/feature_list.html#insights-results-aggregator

Package manifest

Package manifest is available at docs/manifest.txt.