Skip to content

Commit

Permalink
genpolicy: add crate-scoped integration test
Browse files Browse the repository at this point in the history
Provides a test runner that generates a policy and validates it
with canned requests. The initial set of test cases is mostly for
illustration and will be expanded incrementally.

In order to enable both cross-compilation on Ubuntu test runners as well
as native compilation on the Alpine tools builder, it is easiest to
switch to the vendored openssl-src variant. This builds OpenSSL from
source, which depends on Perl at build time.

Adding the test to the Makefile makes it execute in CI, on a variety of
architectures. Building on ppc64le requires a newer version of the
libz-ng-sys crate.

Fixes: kata-containers#10061

Signed-off-by: Markus Rudy <[email protected]>
  • Loading branch information
burgerdev authored and Redent0r committed Feb 18, 2025
1 parent 2e7d73e commit 323a577
Show file tree
Hide file tree
Showing 10 changed files with 459 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
./tests/install_rust.sh
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
- name: Install protobuf-compiler
if: ${{ matrix.command == 'make check' && matrix.component == 'genpolicy' }}
if: ${{ matrix.command != 'make vendor' && (matrix.component == 'agent' || matrix.component == 'genpolicy' || matrix.component == 'agent-ctl') }}
run: sudo apt-get -y install protobuf-compiler
- name: Install musl-tools
if: ${{ matrix.component != 'runtime' }}
Expand Down
Loading

0 comments on commit 323a577

Please sign in to comment.