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

Fixes #16484: rl integration tests v1 #2714

Conversation

gpoblon
Copy link
Contributor

@gpoblon gpoblon commented Jan 14, 2020

Iterative and early work on integration tests for rudder-lang + some structural changes to sources for better naming clarity and to allow for library function calls from integration tests_.

WIP, current notes:
For now, only compile tests are integrated.
3 tests:

  • every file from the compile/ folder,
  • a static array of tuples from inside the compile.rs file,
  • a list of files from the virtual_files.toml
    For the last two tests, a file is created in the tmp/ folder, and called from the base crate compile function.

TODO:

  • Use a macro to make it so 1 (virtual or not) file = 1 test. If it is even possible
  • Clean the compile.rs file, improve features
  • Add translation tests
  • Post-PR note: add this comment into a doc file directly in the test folder

Test Rules:
Tests supposed to fail (ie the compilation handles a failure properly) are meant to be prefixed with a f_. If test is supposed to succeed, prefix it with a s_. Any file that does not match this criteria shall be ignored.
To add a test create a file or add an entry in either the static array or the toml file.

https://issues.rudder.io/issues/16484

@gpoblon gpoblon force-pushed the userstory_16484/rl_integration_tests_v1 branch from 3a56a21 to 6dad21c Compare January 16, 2020 17:21
#[test_case("s_basic")]
#[test_case("s_does_not_exist")] // should fail
fn real_files(filename: &str) {
test_real_file(filename);
Copy link
Member

Choose a reason for hiding this comment

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

why not put the content of the function directly here ?

@Normation-Quality-Assistant
Copy link
Contributor

OK, squash merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 23fb51f into Normation:branches/rudder/6.0 Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants