-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [zuul] Add zuul jobs to sg-bridge (#33) Depends-On: http://github.com/infrawatch/service-telemetry-operator/pull/512 * [zuul] Use the stf-crc-jobs project template (#34) Instead of updating the .zuul.yaml file everytime infrawatch/service-telemetry-operator adds a new job, the project-template can be updated in STO, which will propogate the change to the project and avoid leaving gaps in testing. Depends-On: infrawatch/service-telemetry-operator#514 * Bump actions checkout to v4 (#36) Bump actions checkout to v4 since Node.js 16 actions are deprecated. We need to update to Node.js 20, which is included in actions/checkout@v4. * Rebuild obj files on %.h changes (#38) * Add IPv6 support (#37) * Add IPv6 support This patch makes bridge accept IPv6 addresses as amqp_url value. * Committing clang-format changes * Eliminate implicit-function-declaration in tests * Correct character class in AMQP_URL_REGEX --------- Co-authored-by: InfraWatch CI <robot@infra.watch> Co-authored-by: Chris Sibbitt <csibbitt@redhat.com> Co-authored-by: Victoria Martinez de la Cruz <victoria@redhat.com> * Update repo info for opstools (#39) Centos8s went EOL on 31.05.2024 so the packages have been moved to centos vault mirror the repo config we use needs to be updated --------- Co-authored-by: Emma Foley <elfiesmelfie@users.noreply.github.com> Co-authored-by: Jaromír Wysoglad <jwysogla@redhat.com> Co-authored-by: Martin Mágr <martin.magr@gmail.com> Co-authored-by: InfraWatch CI <robot@infra.watch> Co-authored-by: Chris Sibbitt <csibbitt@redhat.com>
- Loading branch information
1 parent
31825e5
commit 1029feb
Showing
11 changed files
with
306 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Unit tests suite | ||
env: | ||
TEST_IMAGE: quay.io/centos/centos:stream9 | ||
PROJECT_ROOT: /src/github.com/infrawatch/sg-bridge | ||
OPSTOOLS_REPO: https://git.centos.org/rpms/centos-release-opstools/raw/c9s-sig-opstools/f/SOURCES/CentOS-OpsTools.repo | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
unit-tests: | ||
name: Unit tests | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run sg-core unit test suite | ||
run: | | ||
docker run --name=testsuite -uroot --network host -e OPSTOOLS_REPO \ | ||
--volume ${{ github.workspace }}:$PROJECT_ROOT:z --workdir $PROJECT_ROOT \ | ||
$TEST_IMAGE bash $PROJECT_ROOT/ci/run_tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/env bash | ||
# purpose: runt unit test suite | ||
|
||
set -ex | ||
|
||
# enable required repo(s) | ||
dnf install -y centos-release-opstools tree | ||
dnf install make gcc qpid-proton-c-devel annobin-annocheck gcc-plugin-annobin rpm-build -y | ||
|
||
make tests | ||
./tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* taken from https://jera.com/techinfo/jtns/jtn002 | ||
*/ | ||
|
||
/* file: minunit.h */ | ||
#define mu_assert(message, test) \ | ||
do { \ | ||
if (!(test)) \ | ||
return message; \ | ||
} while (0) | ||
#define mu_run_test(test) \ | ||
do { \ | ||
char *message = test(); \ | ||
tests_run++; \ | ||
if (message) \ | ||
return message; \ | ||
} while (0) | ||
extern int tests_run; |
Oops, something went wrong.