Giter Club home page Giter Club logo

zed-testserver's Introduction

zed-testserver

Binary for easy unit and integration testing of applications using the Authzed API.

Installation

Download the latest binary from the Releases.

Overview

The zed-testserver runs a local in-memory version of the Authzed API, exposed by default on port 50051 and without TLS.

Usage

Example

./zed-testserver-linux-amd64 run --load-configs=path/to/default/namespaces/and/tuples.yaml

INF set log level new level=info
INF gRPC server started listening addr=:50051

Arguments

Argument Description
grpc-addr The gRPC at which to bind the local server (default: 50051)
load-configs If specified, the file path(s) of Authzed Playground produced YAMLs to load
log-level The log level of the server (default: info)
json If true, logs will be output in JSON format (default: false)

Prepopulating

zed-testserver supports prepopulating the in-memory API with namespaces and tuples via the --load-configs parameter.

The --load-configs parameter accepts zero (or more) YAML files as produced by the Save operation in the Authzed Playground.

Any namespaces and test tuples defined in the YAML will be loaded into the in-memory API.

Tokens

Using tokens when calling the API as exposed by zed-testserver is optional.

If a token is specified, an isolated data model is created for that token, and maintained for the lifetime of the run of the zed-testserver.

This allows code being tested to easily instantiate a new testing environment for each test by sending a new token per test, without having to rerun zed-testserver.

Note that if --load-configs is specified, the namespaces and tuples found within will be loaded for each isolated data model.

zed-testserver's People

Contributors

josephschorr avatar jzelinskie avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.