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

Proposal: Investigate cuelang to validate output documents #1060

Open
nishakm opened this issue Oct 12, 2021 · 2 comments
Open

Proposal: Investigate cuelang to validate output documents #1060

nishakm opened this issue Oct 12, 2021 · 2 comments
Labels
feature new feature

Comments

@nishakm
Copy link
Contributor

nishakm commented Oct 12, 2021

Problem Statement
Although tests for tern manage to catch issues with analysis, it doesn't validate whether the documents created have the expected content. There isn't much out there that can help with this with regards to python.

Describe the Proposal
Take a look at https://cuelang.org/ to validate tern's document contents.

Steps to Implement Proposal
Take one of the default documents that we have trouble validating by hand and see if we can write cuelang validation tests for it. Then maintainers can make a decision on whether this is feasible to implement for all the document types we support.

@sayantani11
Copy link
Contributor

@nishakm A little more insight will be helpful, maybe I can be of some help

@nishakm
Copy link
Contributor Author

nishakm commented Oct 19, 2021

@sayantani11 I'm actually not sure how much cue would be able to help with checking if our output documents match our expectations. If you'd like you can try writing something in cuelang to check a default document.
To get one of these run:

tern report -i debian:buster -o test_doc.txt

Then write some cue code to check if this line is present:

info: Found 'Debian GNU/Linux 10 (buster)' in /etc/os-release.

You can put your findings in a comment here.

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

No branches or pull requests

3 participants