docs/src/developer/e2e/rust_oci_test.md
This is youki's original integration to verify the behavior of the low-level container runtime.
just test-contest
We will not go into detail here, but will explain how to write and add a new test case based on an example test.
<details> <summary>Fully the code of the example test</summary> <p>{{#include ../../../../tests/contest/contest/src/tests/example/hello_world.rs}}
Build the OCI Runtime Spec you want to verify
This testing framework automatically places runtimetest in the container.
In other words, you can test the processes you want to execute within a container by writing them in runtimetest.
Therefore, it is common practice here to write an OCI Runtime Spec that executes runtimetest.
{{#include ../../../../tests/contest/contest/src/tests/example/hello_world.rs:get_example_spec}}
TestResult, which represents the result of the test.{{#include ../../../../tests/contest/contest/src/tests/example/hello_world.rs:example_test}}
TestGroup and register a test case you created{{#include ../../../../tests/contest/contest/src/tests/example/hello_world.rs:get_example_test}}
TestGroup you created to a TestManager{{#include ../../../../tests/contest/contest/src/main.rs:register_example_test}}
{{#include ../../../../tests/contest/runtimetest/src/main.rs:example_runtimetest_main}}
{{#include ../../../../tests/contest/runtimetest/src/tests.rs:example_hello_world}}