Skip to content

Latest commit

 

History

History
104 lines (85 loc) · 1.91 KB

README.md

File metadata and controls

104 lines (85 loc) · 1.91 KB

X-Test

Compatibility tests for opentdf client libraries and tools.

Requirements

  • go 1.22.3
  • node 20
  • python 3.10
  • jdk 11
  • maven
brew install maven

Platform Setup

Install SDKs

Java SDK

git clone https://github.com/opentdf/java-sdk.git
cd java-sdk
mvn --batch-mode clean install -DskipTests
mv cmdline/target/cmdline.jar ../sdk/java/cmdline.jar

Go SDK wrapped by otdfctl

git clone https://github.com/opentdf/platform
git clone https://github.com/opentdf/otdfctl.git
cd otdfctl
go mod edit -replace github.com/opentdf/platform/protocol/go=../platform/protocol/go
go mod edit -replace github.com/opentdf/platform/sdk=../platform/sdk
go mod tidy
go build .
mv otdfctl ../sdk/go/otdfctl

Platform Backend

  1. Initialize Platform Configuration
    cp opentdf-dev.yaml opentdf.yaml
    sed -i '' 's/e1/ec1/g' opentdf.yaml
    .github/scripts/init-temp-keys.sh
    sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ./keys/localhost.crt
    • To remove the certificate, run:
      sudo security delete-certificate -c "localhost"
  2. Start Background Services
    docker compose up
  3. Provision Keycloak
    go run ./service provision keycloak
  4. Add Sample Attributes and Metadata
    go run ./service provision fixtures
  5. Start Server in Background
    go run ./service start

Setup SDK CLIs

Set the paths to the local repos in env variables

JS_DIR=../../../web-sdk
PLATFORM_DIR=../../../platform
OTDFCTL_DIR=../../../otdfctl
JAVA_DIR=../../../java-sdk

Build all the clis and setup within xtest

cd sdk
make all

Install requirements

pip install -r requirements.txt

Run Tests

pytest

Run TDF Tests

rm -rf tmp
pytest test_tdfs.py