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

Add end to end test for fault detector #29

Merged
merged 10 commits into from
Feb 23, 2024

Conversation

nagdahimanshu
Copy link
Member

@nagdahimanshu nagdahimanshu commented Feb 14, 2024

What was the problem?

This PR resolves #23

How was it solved?

  • Implement getter functions to interact with internal struct
  • Add e2e tests for:
    • Start application with no faults detected (real time test, connect to l1 & l2 chains)
    • Start application with faults detected (mock oracle accessor to return different output root)
    • Implement parseMetricRes to parse prometheus metrics to map
  • Refactor slack notification implementation to make it interface based (needed for mocking)
  • Update Makefile

How was it tested?

Local- make test.e2e

@nagdahimanshu nagdahimanshu self-assigned this Feb 14, 2024
@nagdahimanshu nagdahimanshu force-pushed the 23-add-end-to-end-test-for-fault-detector branch from 759b0f9 to d1c2a01 Compare February 14, 2024 20:59
@nagdahimanshu nagdahimanshu force-pushed the 23-add-end-to-end-test-for-fault-detector branch 3 times, most recently from fd7b416 to 4ea6b61 Compare February 15, 2024 13:12
@nagdahimanshu nagdahimanshu force-pushed the 23-add-end-to-end-test-for-fault-detector branch from 4ea6b61 to e9f1b25 Compare February 15, 2024 13:14
@nagdahimanshu nagdahimanshu force-pushed the 23-add-end-to-end-test-for-fault-detector branch 5 times, most recently from f25ed86 to 02fb4be Compare February 17, 2024 15:23
@nagdahimanshu nagdahimanshu force-pushed the 23-add-end-to-end-test-for-fault-detector branch from 02fb4be to 155dc9e Compare February 17, 2024 20:32
@ishantiw ishantiw requested review from sameersubudhi and removed request for shuse2 February 20, 2024 10:11
@nagdahimanshu nagdahimanshu marked this pull request as ready for review February 20, 2024 10:12
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
pkg/api/server.go Outdated Show resolved Hide resolved
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
pkg/faultdetector/faultdetector.go Outdated Show resolved Hide resolved
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
Copy link
Member

@ishantiw ishantiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, a few comments

cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
cmd/faultdetector/main_test.go Outdated Show resolved Hide resolved
pkg/faultdetector/faultdetector.go Outdated Show resolved Hide resolved
@nagdahimanshu nagdahimanshu force-pushed the 23-add-end-to-end-test-for-fault-detector branch from 1965d90 to 796d4ae Compare February 22, 2024 11:19
Copy link
Contributor

@hrmhatef hrmhatef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job👍, just small suggestion.

pkg/faultdetector/faultdetector.go Show resolved Hide resolved
@nagdahimanshu nagdahimanshu force-pushed the 23-add-end-to-end-test-for-fault-detector branch from 796d4ae to 414b68c Compare February 22, 2024 13:10
Copy link
Member

@sameersubudhi sameersubudhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job, LGTM overall 👍
Adding error handling in the test files would be better. Can be skipped, if that's industry standard.

@nagdahimanshu nagdahimanshu force-pushed the 23-add-end-to-end-test-for-fault-detector branch from 414b68c to c47a285 Compare February 22, 2024 15:02
Copy link
Member

@ishantiw ishantiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job 👏

@nagdahimanshu nagdahimanshu force-pushed the 23-add-end-to-end-test-for-fault-detector branch from f9e16ef to fb675df Compare February 23, 2024 08:52
@nagdahimanshu nagdahimanshu merged commit 9bc8ccd into main Feb 23, 2024
1 check passed
@nagdahimanshu nagdahimanshu deleted the 23-add-end-to-end-test-for-fault-detector branch February 23, 2024 13:08
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

Successfully merging this pull request may close these issues.

Add end to end test for fault detector
4 participants