-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: added test cases for enable action (#1454)
**Issue number:** ## Summary Added unit test cases for enable action in table inputs ### Changes > Added unit test case regarding enable action in `global_config_update.py` file. ### User experience > No change in user experience ## Checklist If your change doesn't seem to apply, please leave them unchecked. * [x] I have performed a self-review of this change * [x] Changes have been tested * [ ] Changes are documented * [x] PR title follows [conventional commit semantics](https://www.conventionalcommits.org/en/v1.0.0/)
- Loading branch information
1 parent
8793cef
commit 62d8ff5
Showing
2 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
tests/unit/testdata/valid_config_input_with_enable_action.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"pages": { | ||
"configuration": { | ||
"tabs": [ | ||
{ | ||
"type": "LoggingTab" | ||
} | ||
], | ||
"title": "Configuration", | ||
"description": "Set up your add-on" | ||
}, | ||
"inputs": { | ||
"services": [ | ||
{ | ||
"name": "example_input_ten", | ||
"entity": [ | ||
{ | ||
"type": "text", | ||
"label": "Name", | ||
"validators": [ | ||
{ | ||
"type": "regex", | ||
"errorMsg": "Input Name must begin with a letter and consist exclusively of alphanumeric characters and underscores.", | ||
"pattern": "^[a-zA-Z]\\w*$" | ||
}, | ||
{ | ||
"type": "string", | ||
"errorMsg": "Length of input name should be between 1 and 100", | ||
"minLength": 1, | ||
"maxLength": 100 | ||
} | ||
], | ||
"field": "name", | ||
"help": "A unique name for the data input.", | ||
"required": true | ||
}, | ||
{ | ||
"type": "interval", | ||
"field": "interval", | ||
"label": "Interval", | ||
"help": "Time interval of the data input, in seconds.", | ||
"required": true | ||
} | ||
], | ||
"title": "Example Input Three" | ||
} | ||
], | ||
"title": "Inputs", | ||
"description": "Manage your data inputs", | ||
"table": { | ||
"actions": [ | ||
"edit", | ||
"delete", | ||
"clone", | ||
"enable" | ||
], | ||
"header": [ | ||
{ | ||
"label": "Name", | ||
"field": "name" | ||
}, | ||
{ | ||
"label": "Interval", | ||
"field": "interval" | ||
}, | ||
{ | ||
"label": "Index", | ||
"field": "index" | ||
}, | ||
{ | ||
"label": "Status", | ||
"field": "disabled" | ||
} | ||
], | ||
"moreInfo": [ | ||
{ | ||
"label": "Name", | ||
"field": "name" | ||
}, | ||
{ | ||
"label": "Interval", | ||
"field": "interval" | ||
}, | ||
{ | ||
"label": "Index", | ||
"field": "index" | ||
}, | ||
{ | ||
"label": "Status", | ||
"field": "disabled", | ||
"mapping": { | ||
"true": "Disabled", | ||
"false": "Enabled" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"meta": { | ||
"name": "Splunk_TA_UCCExample", | ||
"restRoot": "splunk_ta_uccexample", | ||
"version": "1.0.0", | ||
"displayName": "Splunk UCC test Add-on", | ||
"schemaVersion": "0.0.8" | ||
} | ||
} |