vinyldns / vinyldns/vinyldns-cli
Add test for batch change create response
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
Wer're only validating the status currently because the output and fixture formatting are not matching.
Intended test was:
@test "batch-change-create" {
run $ew batch-change-create \
--json "$(cat tests/fixtures/batch_change_create_json)"
fixture="$(cat tests/fixtures/batch_change_create)"
[ "$status" -eq 0 ]
[ "${output}" = "${fixture}" ]
}
The most recent iteration of the the batch_change_create fixture I made was:
+--------------------+-------------------------------+
| ID |
+--------------------+-------------------------------+
| UserName |
+--------------------+-------------------------------+
| UserID |
+--------------------+-------------------------------+
| Status | PendingProcessing |
+--------------------+-------------------------------+
| Comments | request on behalf of someone. |
+--------------------+-------------------------------+
| Changes |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+--------------------+-------------------------------+
| CreatedTimestamp |
+--------------------+-------------------------------+
| OwnerGroupID |
+--------------------+-------------------------------+
| ApprovalStatus | AutoApproved |
+--------------------+-------------------------------+
| ReviewerID | |
+--------------------+-------------------------------+
| ReviewerUserName | |
+--------------------+-------------------------------+
| ReviewerTimestamp | |
+--------------------+-------------------------------+
| ReviewComment | |
+--------------------+-------------------------------+
| ScheduledTime | |
+--------------------+-------------------------------+
| CancelledTimestamp | |
+--------------------+-------------------------------+
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the intended batch-change-create test and the fixtures at tests/fixtures/batch_change_create_json and tests/fixtures/batch_change_create. Run the command shown in the issue, compare its output with the fixture, and update the test fixture or formatting so the status and exact output assertions pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, testing-qa
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100