fediverse_pasture.runner.result_store
ResultStore
Source code in fediverse_pasture/runner/result_store.py
add_result(test_name, application_name, data)
async
Adds a result to the database. The pairs (test_name, application_name) are assumed to be unique. If data already exists, it is overwritten with the new data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
test_name |
str
|
Name of the test |
required |
application_name |
str
|
Name of the application |
required |
data |
dict
|
Data to add |
required |
Source code in fediverse_pasture/runner/result_store.py
delete_record(test_name, application_name)
async
Deletes database record if exists
Parameters:
Name | Type | Description | Default |
---|---|---|---|
test_name |
str
|
Name of the test |
required |
application_name |
str
|
Application to delete the result for |
required |
Source code in fediverse_pasture/runner/result_store.py
entry_for_test(test_name)
async
Returns an Entry for test_name. We note here that an Entry contains the results for each application the test result is available for.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
test_name |
str
|
name of the test entry |
required |
Returns:
Type | Description |
---|---|
Entry
|
Entry from record |
Source code in fediverse_pasture/runner/result_store.py
load(filename='test_results.toml')
async
Deletes the current content from the database, then loads the content from filename to it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename |
str
|
filename to load from |
'test_results.toml'
|
Source code in fediverse_pasture/runner/result_store.py
results_for_test(test_name)
async
Retrieves the results for a given test_name
Source code in fediverse_pasture/runner/result_store.py
save(filename='test_results.toml')
async
Saves the content of the database to the file given by filename
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename |
str
|
filename to save to |
'test_results.toml'
|
Source code in fediverse_pasture/runner/result_store.py
with_store(db_url='sqlite://test_results.sqlite')
async
Initializes the database and returns a ResultStore. Usage:
Parameters:
Name | Type | Description | Default |
---|---|---|---|
db_url |
str
|
Database url string |
'sqlite://test_results.sqlite'
|