Code Monkey home page Code Monkey logo

hacbs-test's Introduction

HACBS-TEST

This is HACBS-test team repository. Purpose of this repo is to store resources, currently for tekton tasks and pipelines.

Prerequisites

Install the following list of packages to run the policies locally.

  1. Conftest
  2. jq
  3. Skopeo

Policy Unit Testing

In addition to prerequisites install the packages below to run unit testing.

  1. OPA

Running command opa test <path> [path [...]] executes unit testing for policy, path points to the policy folder and unit testing fixtures data folder.

Running policy unit testing with code coverage report opa test <path> [path [...]] -c

Running policy unit testing and exit with non-zero status if coverage is less than threshold % policy test <path> [path [...]] --threshold float

In this repository, we run opa test policies unittests unittests/test_data -c > /tmp/policy_unittest_result.json to get unit testing code coverage and then analyze.

Policy Integration Testing

In addition to prerequisites install the packages below to run integration testing.

  1. BATS

Run Integration tests locally by export the policies directory path to policies folder as shown below.

export POLICY_PATH=policies

sh test/entrypoint.sh

Contact

hacbs-test's People

Contributors

dependabot[bot] avatar martinbasti avatar dheerajodha avatar jsztuka avatar hongweiliu17 avatar dirgim avatar josh-everett avatar srivickynesh avatar jencull avatar kasemalem avatar jinqi7 avatar 14rcole avatar crozzy avatar staticf0x avatar dannyb48 avatar mkosiarc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.