flagd/test/integration
Simon Schrottner 59c2ff1f72
build: decouple integration tests from the rest of the codebase (#1792)
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
2025-09-04 14:28:00 +02:00
..
config test: update e2e tests (#1452) 2024-11-19 16:22:39 -05:00
README.md chore(refactor): use memdb for flag storage (#1697) 2025-07-30 09:08:47 -04:00
evaluation_test.go test: update e2e tests (#1452) 2024-11-19 16:22:39 -05:00
go.mod fix(security): update module github.com/go-viper/mapstructure/v2 to v2.4.0 [security] (#1784) 2025-08-29 15:14:05 -04:00
go.sum build: decouple integration tests from the rest of the codebase (#1792) 2025-09-04 14:28:00 +02:00
integration_test.go chore: move e2e tests to test (#1005) 2023-11-15 09:27:40 -05:00
json_evaluator_test.go test: update e2e tests (#1452) 2024-11-19 16:22:39 -05:00

README.md

Integration tests

The continuous integration runs a set of gherkin integration tests. If you'd like to run them locally, first pull the test-harness git submodule

git submodule update --init --recursive

then build the flagd binary

make build

then run the flagd binary

make flagd-integration-test-harness

and finally run

make flagd-integration-test

TLS

To run the integration tests against a flagd instance configured to use TLS, do the following:

Generate a cert and key in the repository root

openssl req -x509 -out localhost.crt -keyout localhost.key \
  -newkey rsa:2048 -nodes -sha256 \
  -subj '/CN=localhost' -extensions EXT -config <( \
   printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")

build the flagd binary

make build

then run the flagd binary with tls configuration

./bin/flagd start -f file:test-harness/symlink_testing-flags.json -c ./localhost.crt -k ./localhost.key

finally, either run the tests with an explicit path to the certificate:

make ARGS="-tls true -cert-path ./../../localhost.crt" integration-test

or, run without the path, defaulting to the host's root certificate authorities set (for this to work, the certificate must be registered and trusted in the host's system certificates)

make ARGS="-tls true" integration-test