Skip to content

Commit

Permalink
refined emulated frontend test
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyBRoswell committed Jun 22, 2024
1 parent 17e9abe commit eac72b8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions vreapis/tests/emulated-frontend/containerizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@
import argparse
import re

arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('in_def', nargs='+')
arg_parser.add_argument('--in-id', action='append', nargs='+')
arg_parser = argparse.ArgumentParser(description='''
These tests emulate a frontend to test the endpoints of VRE PaaS API.
At this moment, folder `dat` contains all the test input data. Each file represents an entire request body.
Some files contain only 1 segment of extension `.json`. This indicates that the file is the only test case.
Some files contain 2 segments of extension (ex. `.1.json`). The substring between 2 dots is the ID of the test case (`1` in this example).
'''.strip())
arg_parser.add_argument('in_def', nargs='+', help='''
Default: Test the designated endpoint using all the existing request bodies.
'''.strip())
arg_parser.add_argument('--in-id', action='append', nargs='+', help='''
Specify test cases by ID: Test the designated endpoint using the request bodies with the specified IDs.
'''.strip())
args = arg_parser.parse_args()

script_path: str = os.path.dirname(os.path.realpath(__file__))
Expand Down

0 comments on commit eac72b8

Please sign in to comment.