Skip to content

VEuPathDB/vdi-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VDI API Tests

A collection of test scripts to be run through Make against a locally running VDI instance.

For a full list of available commands on the CLI, run make with no target.

Prerequisites

  • A running local VDI stack

  • VEuPathDB OAuth bearer token

  • make

  • curl

  • jq

Setup

Set or export the environment variable VDI_AUTH_TOKEN to your OAuth bearer token value.

export VDI_AUTH_TOKEN=a304ajalskdfja3a0jsdlfak3q30-a0aseajflawskdjflaweblahblahblah

Outputs

Test outputs and generated curl commands will be placed in subdirectories under the test-outputs/ directory. Each test run directory will be named using the timestamp of the test execution.

The contents of each test directory on successful command completion will be:

  • curl-command.sh - The curl command that was executed to run the test.

  • full-response.txt - The entire curl stdout from executing the command.

  • status.txt - The numeric HTTP response code.

  • headers.txt - The response headers from the HTTP server.

  • body.txt - The body portion of the HTTP response.

Example Result
test-outputs/
 |- test-1765994074430/
     |- body.txt
     |- curl-command.sh
     |- full-response.txt
     |- headers.txt
     |- status.txt

Available Tests

Global Options

Options available for all make targets:

DRY_RUN

Set to 1 to disable command execution. The curl-command.sh file will be generated, but will not be run automatically.

$ make some-target DRY_RUN=1
generating curl command
Output saved in test-outputs/test-1765999359390

Create Dataset

BIOM Datasets

Submits a BIOM dataset to the VDI API using the test data and configuration defined in requests/create-dataset/biom.

make create-dataset-biom

GeneList Datasets

Submits a GeneList dataset to the VDI API using the test data and configuration defined in requests/create-dataset/genelist/plasmo-01.

make create-dataset-genelist-plasmo

List Datasets

List Visible User Datasets

Gets a list of datasets visible to your user by way of ownership or sharing.

make list-my-datasets

Print Visible User Datasets

Prints the list of datasets visible to your user to the console as formatted JSON.

make print-my-datasets

Delete Datasets

Deletes a target dataset.

Command
make delete-dataset
Additional Options
DATASET_ID

When provided, defines the ID of the target dataset to be deleted. If not provided, the test script will prompt for the target dataset’s ID.

Example 1: Interactive
$ make delete-dataset
Dataset ID: <input dataset id>
running delete request
Output saved in test-outputs/test-1765999293008
Example 2: With CLI Option
$ make DATSET_ID=123213 delete-dataset
running delete request
Output saved in test-outputs/test-1765999293008

About

Test harnesses and data for VDI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •