house keeping

This commit is contained in:
2026-02-21 19:17:36 -05:00
parent 443562dfb6
commit 47eefd0fe5
5 changed files with 0 additions and 1172 deletions

View File

@@ -6,66 +6,6 @@ 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
@@ -207,36 +147,6 @@ check-deps:
@pkg-config --exists rocksdb || (echo "$(RED)✗ RocksDB not found$(NC)" && exit 1)
@echo "$(GREEN)✓ All dependencies found$(NC)"
# AWS CLI test commands
aws-test: run &
@sleep 2
@echo "$(BLUE)Testing with AWS CLI...$(NC)"
@echo "\n$(YELLOW)Creating table...$(NC)"
@aws dynamodb create-table \
--endpoint-url http://localhost:$(PORT) \
--table-name TestTable \
--key-schema AttributeName=pk,KeyType=HASH \
--attribute-definitions AttributeName=pk,AttributeType=S \
--billing-mode PAY_PER_REQUEST || true
@echo "\n$(YELLOW)Listing tables...$(NC)"
@aws dynamodb list-tables --endpoint-url http://localhost:$(PORT)
@echo "\n$(YELLOW)Putting item...$(NC)"
@aws dynamodb put-item \
--endpoint-url http://localhost:$(PORT) \
--table-name TestTable \
--item '{"pk":{"S":"test1"},"data":{"S":"hello world"}}'
@echo "\n$(YELLOW)Getting item...$(NC)"
@aws dynamodb get-item \
--endpoint-url http://localhost:$(PORT) \
--table-name TestTable \
--key '{"pk":{"S":"test1"}}'
@echo "\n$(YELLOW)Scanning table...$(NC)"
@aws dynamodb scan \
--endpoint-url http://localhost:$(PORT) \
--table-name TestTable
@echo "\n$(GREEN)✓ AWS CLI test complete$(NC)"
# Development workflow
dev: clean build run
@@ -261,7 +171,6 @@ help:
@echo ""
@echo "$(GREEN)Test Commands:$(NC)"
@echo " make test - Run unit tests"
@echo " make aws-test - Test with AWS CLI commands"
@echo ""
@echo "$(GREEN)Utility Commands:$(NC)"
@echo " make fmt - Format source code"