Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define policy for tests #77

Open
TheDZhon opened this issue Jun 16, 2022 · 2 comments
Open

Define policy for tests #77

TheDZhon opened this issue Jun 16, 2022 · 2 comments
Assignees

Comments

@TheDZhon
Copy link
Contributor

TheDZhon commented Jun 16, 2022

Simple summary

We should discriminate omnibus votes into two categories: sensitive protocol upgrades & others

  • The First category requires unit, regression, snapshot, and integration test suites.
  • For the second category, it's possible to skip the snapshot tests for the sake of reducing process overheads

Motivation

We have adopted GitHub CI process recently for the repo. While it is always good to achieve a bright green mark for every pushed head by running as many tests as possible, it also requires additional effort to maintain the repo consistency.

Snapshot tests usually represent the following invariant: 'all states should be left as is except only X', thus you have to define 'X' properly for each voting script. If you have multiple voting scripts then complexity rises drastically.
At the same time, other types of tests usually check only the new state and have no assumptions for the diff items over all state slots and their values.

Proposal

Option 1. Mark protocol upgrade votings differently (naive and dirty)

For e.g., we may use upvote_xx_xx_xx.py filename pattern which should be followed by the tests runner as a flag to run additional tests.

Option 2. Bake a framework for the snapshot tests

Following the approach, one will need to import the desired snapshot tests and define the expected state diffs for them.

Decision (TBA)

Personally, I believe that option 2 should be implemented.
Other opinions and options are highly appreciated here.

FYI: @folkyatina, @ujenjt

@ujenjt
Copy link
Member

ujenjt commented Jun 16, 2022

Option 2

@folkyatina
Copy link
Member

I'd rather prefer option 1 right now. With possible expansion to option 2 when we figure out a robust API for it. Just to reduce the number of entities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@TheDZhon @ujenjt @folkyatina and others