Git Product home page Git Product logo

gradetool's Introduction

gradetool

This is a simple application to read in a claim.json generated by running the cnf-certification-test suite and give a score based on a pre-determined list of pass/fail/skipped tests.

Development

In Visual Studio Code, you can edit your settings.json if you want to run this in debug mode by using something similar to the following:

{
    "launch": {

        "configurations": [
            {
                "name": "Launch Package",
                "type": "go",
                "request": "launch",
                "mode": "debug",
                "program": "/Users/bpalm/Repositories/go/src/github.com/test-network-function/gradetool/main.go",
                "args": ["-r /Users/bpalm/Repositories/go/src/github.com/test-network-function/gradetool/testdata/example-claim.json",  "-p /Users/bpalm/Repositories/go/src/github.com/test-network-function/gradetool/schemas/policy-good.json",  "-o /Users/bpalm/Repositories/go/src/github.com/test-network-function/gradetool/results/test.txt"],
            }
        ],
        "compounds": []
    }
}

To run the tool, you can run it straight from the source using:

  • make build
  • ./gradetool -p schemas/generated_policy.json -o results/test.txt -r testdata/example-claim.json

Using Docker/Podman

You can run the tool directly using docker or podman using the following example:

docker run -v generated_policy.json:/policy.json -v testdata/example-claim.json:/claim.json quay.io/testnetworkfunction/gradetool:latest -p /policy.json -o results/test.txt -r /claim.json

Example used during development:

docker run -v /Users/bpalm/Repositories/go/src/github.com/test-network-function/gradetool/schemas/generated_policy.json:/policy.json -v /Users/bpalm/Repositories/go/src/github.com/test-network-function/gradetool/testdata/example-claim.json:/claim.json quay.io/testnetworkfunction/gradetool:latest -p /policy.json -o results/test.txt -r /claim.json

The trick to this command is that you have to mount the incoming policy file and claim file as volumes prior to running. This does make it easier to run so you do not have to build the binary first, etc.

gradetool's People

Contributors

sebrandon1 avatar dependabot[bot] avatar edcdavid 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.