make inventory-up-kindIncludes:
- Builds inventory container image
- Build E2E test container image
- Deploys local kind cluster with contour, strimzi, postgres, spicedb, kafka, relations-api and inventory
- Runs E2E test job in kind cluster
Check the result of the E2E test job with:
make check-e2e-testsTeardown the kind cluster with:
make inventory-down-kindkubectl apply -f e2e-batch.yamlNote: this is done already by make inventory-up-kind
make inventory-up-kafka
make build
update kafka-inventory-api.yaml
authn:
authenticator:
type: first_match
chain:
- type: guest
enabled: true./bin/inventory-api serve --config ./kafka-inventory-api.yaml
export INV_GRPC_URL=localhost:9081
export KAFKA_BOOTSTRAP_SERVERS=localhost:9092
go test ./... -count=1 -skip 'TestInventoryAPIHTTP_*'
./bin/inventory-api serve --config ./kafka-inventory-api.yaml
export KAFKA_SECURITY_PROTOCOL=SSL
export KAFKA_CLIENT_CERT=/<path>/client-tls.crt
export KAFKA_CLIENT_KEY=/<path>/client-tls.key
export KAFKA_SSL_KEY_PASSWORD"=if any...
export INV_HTTP_URL=localhost:8081
export KAFKA_BOOTSTRAP_SERVERS=localhost:9092
export INV_TLS_INSECURE=false
INV_TLS_CERT_FILE=/<path>/tls.crt
INV_TLS_KEY_FILE=/<path>/tls.key
INV_TLS_CA_FILE=/<path>/ca.pem
Run test
go test ./... -count=1 -skip 'TestInventoryAPIGRPC_*'
Build and run an e2e test image, pointed a custom test environment.
Run from the root directory
docker build -t localhost/inventory-e2e-tests:latest -f Dockerfile-e2edocker run -e INV_GRPC_URL=<host>:9081 -e KAFKA_BOOTSTRAP_SERVERS=<host:9092> localhost/inventory-e2e-tests:latest