RedHatInsights / insights-content-service

Apache License 2.0
2 stars 18 forks source link

Insights Content Service

forthebadge made-with-go GoDoc GitHub Pages Go Report Card Build Status Build Status GitHub go.mod Go version codecov License

Content service for Insights rules groups, tags, and content.

Description

Insights Content Service is a service that provides metadata information about rules that are being consumed by Openshift Cluster Manager. That metadata information contains rule title, description, remmediations, tags and also groups, that will be consumed primarily by Insights Results Smart Proxy.

Documentation

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

Usage

Usage:

    ./insights-content-service [command]

The commands are:

    <EMPTY>             starts content service
    start-service       starts content service
    help                prints help
    print-help          prints help
    print-config        prints current configuration set by files & env variables
    print-groups        prints current groups configuration
    print-rules         prints current parsed rules
    print-parse-status  prints information about all rules that have been parsed
    print-version-info  prints version info

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
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. Build this service using ./build.sh --test-rules-only
  2. clone the Insights Behavioral Spec repository
  3. copy this directory with the insights-content-service executable into the insights-behavioral-spec subdirectory
  4. run the insights_content_service_test.sh from the insights-behavioral-spec subdirectory

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

Definition of Done for new features and fixes

Please look at DoD.md document for definition of done for new features and fixes.

Contribution

Please look into document CONTRIBUTING.md that contains all information about how to contribute to this project.

Package manifest

Package manifest is available at docs/manifest.txt.