fix tingz

This commit is contained in:
2026-02-16 18:00:59 -05:00
parent 228b422393
commit 78a4ea7a0c
3 changed files with 148 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
.PHONY: all build release run test clean fmt help install sdk_test
.PHONY: all build release run test clean fmt help install
# Project configuration
PROJECT_NAME := jormundb
@@ -6,6 +6,66 @@ ODIN := odin
BUILD_DIR := build
SRC_DIR := .
# Docker configuration for test SDK
TEST_SDK_IMAGE := your-dockerhub-username/odin-python-test-sdk
TEST_SDK_TAG := latest
JORMUN_PORT ?= 8002
# Build the test SDK Docker image
.PHONY: build-test-sdk
build-test-sdk:
@echo "Building test SDK Docker image..."
docker build -f Dockerfile_test_sdk -t $(TEST_SDK_IMAGE):$(TEST_SDK_TAG) .
@echo "Test SDK image built successfully"
# Push the test SDK image to registry
.PHONY: push-test-sdk
push-test-sdk: build-test-sdk
@echo "Pushing test SDK image to registry..."
docker push $(TEST_SDK_IMAGE):$(TEST_SDK_TAG)
@echo "Test SDK image pushed successfully"
# Pull the test SDK image from registry
.PHONY: pull-test-sdk
pull-test-sdk:
@echo "Pulling test SDK image from registry..."
docker pull $(TEST_SDK_IMAGE):$(TEST_SDK_TAG)
# Run SDK tests in the consolidated container
.PHONY: test-sdk
test-sdk:
@echo "Running SDK tests..."
docker run --rm \
--network host \
-v $(PWD):/workspace \
-w /workspace \
-e JORMUN_ENDPOINT=http://localhost:$(JORMUN_PORT) \
-e AWS_ACCESS_KEY_ID=local \
-e AWS_SECRET_ACCESS_KEY=local \
-e AWS_DEFAULT_REGION=us-east-1 \
$(TEST_SDK_IMAGE):$(TEST_SDK_TAG) \
sh -c "make build && python tests/sdk/test_sdk.py"
# Run SDK tests with live rebuild (for development)
.PHONY: test-sdk-dev
test-sdk-dev:
@echo "Running SDK tests with live rebuild..."
docker run --rm -it \
--network host \
-v $(PWD):/workspace \
-w /workspace \
-e JORMUN_ENDPOINT=http://localhost:$(JORMUN_PORT) \
-e AWS_ACCESS_KEY_ID=local \
-e AWS_SECRET_ACCESS_KEY=local \
-e AWS_DEFAULT_REGION=us-east-1 \
$(TEST_SDK_IMAGE):$(TEST_SDK_TAG) \
/bin/bash
# One-time setup: build and push test SDK image
.PHONY: setup-test-sdk
setup-test-sdk: build-test-sdk push-test-sdk
@echo "Test SDK setup complete"
# C++ shim (WAL replication helpers via RocksDB C++ API)
SHIM_DIR := rocksdb_shim
SHIM_LIB := $(BUILD_DIR)/libjormun_rocksdb_shim.a
@@ -176,12 +236,6 @@ aws-test: run &
--table-name TestTable
@echo "\n$(GREEN)✓ AWS CLI test complete$(NC)"
# Python SDK integration tests (requires JormunDB running on localhost)
sdk_test:
@echo "$(BLUE)Running Python SDK tests against localhost:$(PORT)...$(NC)"
@docker compose -f $(SDK_TEST_COMPOSE) down --remove-orphans 2>/dev/null || true
@JORMUN_PORT=$(PORT) docker compose -f $(SDK_TEST_COMPOSE) run --rm --build sdk-test
@docker compose -f $(SDK_TEST_COMPOSE) down --remove-orphans 2>/dev/null || true
# Development workflow
dev: clean build run
@@ -208,7 +262,6 @@ help:
@echo "$(GREEN)Test Commands:$(NC)"
@echo " make test - Run unit tests"
@echo " make aws-test - Test with AWS CLI commands"
@echo " make sdk_test - Run Python SDK integration tests (requires running server)"
@echo ""
@echo "$(GREEN)Utility Commands:$(NC)"
@echo " make fmt - Format source code"