Skip to content

A repository that shares across our various dependencies testing scenarios so they are all in sync.

Notifications You must be signed in to change notification settings

flipt-io/test-corpus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Flipt Test Corpus

There are many places in flipt where we need to synchronize functionality of evaluations for consistency purposes. The goal of this repository is to provide a single source of truth for evaluation request payloads and the expectation as those payloads are evaluated.

Currently, there are three repos that will benefit from this corpus:

  • flipt
  • flipt-client-sdks
  • flipt-server-sdks

Flipt provides the amazing functionality of potentially sourcing its data from a git repository which means the server can just watch the testdata directory here.

Wherever this test corpus is being leveraged (probably in CI), it would have to download the tests.json and it would be up to the language of interest to make sense of the JSON file.

The structure of the tests.json is as follows:

{
    "VARIANT": [
        {
            "request": {
                // Request information
            },
            "expectation": {
                // Expectation that the response should match
            }
        }
    ],
    "BOOLEAN": [
        ...
    ],
    "BATCH": [
        ...
    ]
}

variant, boolean, and batch are separated because they need to be deserialized differently, as you would imagine. So it should be as simple as deserializing the tests.json, and running through each array providing the request to the client, and asserting against the response with the expectation.

About

A repository that shares across our various dependencies testing scenarios so they are all in sync.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages