aws / aws/event-ruler

Reduce Duplication between ACMachineTest and MachineTest

Open
#83 0 comments 0 reactions 0 assignees View on GitHub
bug good first issue help wanted
Dominant language
Java
Stars
615
Forks
82
Avg merge
1d 22h
Merged PRs (30d)
7

Description

Tracking ticket to follow up on https://github.com/aws/event-ruler/pull/82#discussion_r1154645620

> What I have been doing recently is added rulesForJSONEvent tests to ACMachineTest and adding rulesForEvent tests (otherwise identical) to MachineTest. I think that is the intended difference between the two test classes? So change this and add a version to ACMachineTest? Of course, we should probably think through a path forward to stop duplicating all tests.

Need to
* combine tests cases (some are missing from ACMachineTest and others are lacking in MachineTest)
* build a wrapper method to call both `rulesForJSONEvent` and `rulesForEvent`
* handle cases when both should be returning different results for Array Consistency.

Contributor guide

Open the contributing guide

Research direction

Start by comparing ACMachineTest and MachineTest, focusing on the existing rulesForJSONEvent and rulesForEvent tests and the Array Consistency cases. Review the linked pull request discussion for context, then determine how shared test cases and a wrapper should cover both methods while preserving cases with different expected results.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.