-
Notifications
You must be signed in to change notification settings - Fork 15
Trusted pubkeys #514
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
Trusted pubkeys #514
Conversation
- fixed tests - added trusted keys
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #514 +/- ##
=========================================
- Coverage 81.2% 80.6% -0.7%
=========================================
Files 27 27
Lines 1776 1868 +92
=========================================
+ Hits 1443 1506 +63
- Misses 214 231 +17
- Partials 119 131 +12 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests share a lot of (setup) code. Some tests even start failing if executed individually or in different orders.
A quick fix for this is to just move the shared setup code into a function:
func Test_Test1(t *testing.T) {
setup := func(t *testing.T) {
// setup code
}
t.Run("subtest1", func(t *testing.T) {
setup(t)
// execute test
})
This ensures that all tests setup their environment individually and that they don't leak into other tests.
Co-authored-by: Matthias Fasching <5011972+fasmat@users.noreply.github.com>
Co-authored-by: Matthias Fasching <5011972+fasmat@users.noreply.github.com>
Which tests depend on the order they are executed in? |
go test -run ^Test_CheckCertificate$/^valid_certificate_\(with_loaded_trusted_keys\)$ github.com/spacemeshos/poet/registration but it actually looks like if executed like this the test isn't run at all. Maybe that's because the tests are double nested? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we fix the Docker linting error as well in this PR so GH stops complaining that AS
should be capitalized when FROM
is? 🙂
I've already removed this test and refactored others. Please check again :) |
Co-authored-by: Matthias Fasching <5011972+fasmat@users.noreply.github.com>
Closes #501
PR includes:
Connected with PR:
spacemeshos/go-spacemesh#6313