Skip to content

Local tests#398

Draft
lippserd wants to merge 1 commit intomainfrom
local-tests
Draft

Local tests#398
lippserd wants to merge 1 commit intomainfrom
local-tests

Conversation

@lippserd
Copy link
Member

No description provided.

Copy link
Member

@oxzi oxzi left a comment

Choose a reason for hiding this comment

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

This draft PR is quite old and a bit outdated. Do you want to proceed here, @lippserd?

In general, I am in favor of such a testing script and I guess everyone of us has its own kind, which is not so ideal.

For example, I have an uncommited tests/test.sh like the following.

Click here!!1
#!/bin/sh

set -eu

cd ..

CGO_ENABLED=0 go build ./cmd/icingadb

pushd tests
go test -o ../icingadb-test -c .
pushd sql
go test -o ../../icingadb-test-sql -c .
popd
popd

set +e -x
for t in mysql pgsql; do
#for t in pgsql; do
  export ICINGADB_TESTS_DATABASE_TYPE="$t"
  export ICINGA_TESTING_ICINGADB_BINARY="$(pwd)/icingadb"
  export ICINGA_TESTING_ICINGADB_SCHEMA_MYSQL="$(pwd)/schema/mysql/schema.sql"
  export ICINGA_TESTING_ICINGADB_SCHEMA_PGSQL="$(pwd)/schema/pgsql/schema.sql"
  ./icingadb-test -icingatesting.debuglog debug.log -test.v # -test.run TestCleanupAndRetention
  #./icingadb-test -icingatesting.debuglog debug.log -test.v -test.run TestCleanupAndRetention
  # ./icingadb-test-sql -icingatesting.debuglog debug-sql.log -test.v
  # ./icingadb-test -icingatesting.debuglog debug.log -test.v # -test.run '^\QTestSla\E$/^\QMultipleStateChangesDecimals'
done

Should we continue here or would you consider closing this PR? With the new year, I am trying to clean up the issue tracker a bit.


run() {
export ICINGA_TESTING_ICINGADB_BINARY=icingadb
export ICINGA_TESTING_ICINGADB_SCHEMA=../schema/mysql/schema.sql
Copy link
Member

Choose a reason for hiding this comment

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

There are ICINGA_TESTING_ICINGADB_SCHEMA_MYSQL and ICINGA_TESTING_ICINGADB_SCHEMA_PGSQL now.

@lippserd
Copy link
Member Author

lippserd commented Jan 9, 2026

This draft PR is quite old and a bit outdated. Do you want to proceed here, @lippserd?

You're very welcome to take over or introduce something new.

@oxzi oxzi self-assigned this Jan 14, 2026
@oxzi oxzi added this to the 1.5.2 milestone Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants