github.com/git-lfs/git-lfs@v2.5.2+incompatible/t/git-lfs-test-server-api/README.md (about)

     1  # Git LFS Server API compliance test utility
     2  
     3  This package exists to provide automated testing of server API implementations, 
     4  to ensure that they conform to the behaviour expected by the client. You can
     5  run this utility against any server that implements the Git LFS API. 
     6  
     7  ## Automatic or data-driven testing
     8  
     9  This utility is primarily intended to test the API implementation, but in order
    10  to correctly test the responses, the tests have to know what objects exist on
    11  the server already and which don't. 
    12  
    13  In 'automatic' mode, the tests require that both the API and the content server
    14  it links to via upload and download links are both available & free to use. 
    15  The content server must be empty at the start of the tests, and the tests will
    16  upload some data as part of the tests. Therefore obviously this cannot be a
    17  production system.
    18  
    19  Alternatively, in 'data-driven' mode, the tests must be provided with a list of 
    20  object IDs that already exist on the server (minimum 10), and a list of other
    21  object IDs that are known to not exist. The test will use these IDs to 
    22  construct its data sets, will only call the API (not the content server), and
    23  thus will not update any data - meaning you can in theory run this against a 
    24  production system. 
    25  
    26  ## Calling the test tool
    27  
    28  ```
    29  git-lfs-test-server-api [--url=<apiurl> | --clone=<cloneurl>] 
    30                          [<oid-exists-file> <oid-missing-file>]
    31                          [--save=<fileprefix>]
    32  ```
    33  
    34  |Argument|Purpose|
    35  |------|-------|
    36  |`--url=<apiurl>`|URL of the server API to call. This must point directly at the API root and not the clone URL, and must be HTTP[S]. You must supply either this argument or the `--clone` argument|
    37  |`--clone=<cloneurl>`|The clone URL from which to derive the API URL. If it is HTTP[S], the test will try to find the API at `<cloneurl>/info/lfs`; if it is an SSH URL, then the test will call git-lfs-authenticate on the server to derive the API (with auth token if needed) just like the git-lfs client does. You must supply either this argument or the `--url` argument|
    38  |`<oid-exists-file> <oid-missing-file>`|Optional input files for data-driven mode (both must be supplied if this is used); each must be a file with `<oid> <size_in_bytes>` per line. The first file must be a list of oids that exist on the server, the second must be a list of oids known not to exist. If supplied, the tests will not call the content server or modify any data. If omitted, the test will generate its own list of oids and will modify the server (and expects that the server is empty of oids at the start)|
    39  |`--save=<fileprefix>`|If specified and no input files were provided, saves generated test data in the files `<fileprefix>_exists` and `<fileprefix>_missing`. These can be used as parameters to subsequent runs if required, if the server content remains unchanged between runs.|
    40  ## Authentication
    41  
    42  Authentication will behave just like the git-lfs client, so for HTTP[S] URLs the
    43  git credential helper system will be used to obtain logins, and for SSH URLs,
    44  keys can be used to automate login. Otherwise you will receive prompts on the
    45  command line.
    46