Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Compute Risk & Residual Risk with Rust struct #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vaceletm
Copy link
Member

@vaceletm vaceletm commented May 6, 2024

Example that leverage Rust structure and automatic parsing using serde.

Example that leverage Rust structure and automatic parsing using serde.
@vaceletm vaceletm requested review from LeSuisse and Gashmob May 6, 2024 15:39
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you provide a example sample. Can you add a test which call the Tuleap Function with it and check result?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to do this. Do you have some example I can check ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In rust I have no idea, but in bash something like that (not tested):

#!/usr/bin/bash

output=$(cat sample.json | cargo run)
expected="__expected-output__"

if [[ "$output" == "$expected" ]]; then
    exit 0
else
    echo -e "Tuleap function returns:\n$output\n\nExpected:\n$expected"
    exit 1
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants