You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#235 was a large PR that reintroduced a bug fixed by #282.
Specifically, in runtime/test_artifacts/uti.go, the addition of os.Exit(0)
funcCleanupPostgresDocker(_*testing.M, pool*dockertest.Pool, resource*dockertest.Resource) {
// You can't defer this because `os.Exit`` doesn't care for deferiferr:=pool.Purge(resource); err!=nil {
log.Fatalf("could not purge resource: %s", err)
}
os.Exit(0)
}
Ignores the exitCode in persistence/test/setup_test.go
funcTestMain(m*testing.M) {
pool, resource, dbUrl:=test_artifacts.SetupPostgresDocker()
testPersistenceMod=newTestPersistenceModule(dbUrl)
exitCode:=m.Run()
test_artifacts.CleanupPostgresDocker(m, pool, resource)
os.Exit(exitCode)
}
Resulting in various errors committed to main:
Doing a hard reset to the prior commit (git reset --hard 2c390c3c055b4d1a36fb93075867bcf96b89fdcd) validated that these tests were functional in the previous commit.
Goals
make develop_test should pass after removing os.Exit(0) from runtime/test_artifacts/util.go
Deliverable
Removal of os.Exit(0) in runtime/test_artifacts/util.go
Fixes in all broken tests raised by make test_all
Non-goals / Non-deliverables
New functionality
Refactoring / organizing existing code
Testing Methodology
All tests: make develop_test
LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md
## Description
This PR fixes a regression that was hiding an actual bug in the code.
## Issue
Fixes#308
## Type of change
Please mark the relevant option(s):
- [ ] New feature, functionality or library
- [x] Bug fix
- [ ] Code health or cleanup
- [ ] Major breaking change
- [ ] Documentation
- [ ] Other <!-- add details here if it a different type of change -->
## List of changes
- Making sure that the test harness returns the right return code to the OS
- Added missing mappings
## Testing
- [x] `make develop_test`
- [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README`
<!--
If you added additional tests or infrastructure, describe it here.
Bonus points for images and videos or gifs.
-->
## Required Checklist
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have tested my changes using the available tooling
- [x] I have updated the corresponding CHANGELOG
### If Applicable Checklist
- [ ] I have updated the corresponding README(s); local and/or global
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s)
- [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s)
* test(test_artifacts): removed os.Exit(0) that was bypassing some tests
* fix(Persistence): added missing properties to converter
* test(Utility): added missing mock config as per comment
#309 (comment)
Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com>
Objective
Fix broken bugs on main introduced by #235.
Origin Document
#235 was a large PR that reintroduced a bug fixed by #282.
Specifically, in
runtime/test_artifacts/uti.go
, the addition ofos.Exit(0)
Ignores the
exitCode
inpersistence/test/setup_test.go
Resulting in various errors committed to main:
Doing a hard reset to the prior commit (
git reset --hard 2c390c3c055b4d1a36fb93075867bcf96b89fdcd
) validated that these tests were functional in the previous commit.Goals
make develop_test
should pass after removingos.Exit(0)
fromruntime/test_artifacts/util.go
Deliverable
os.Exit(0)
inruntime/test_artifacts/util.go
make test_all
Non-goals / Non-deliverables
Testing Methodology
make develop_test
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdCreator: @Olshansk
Co-Owners: @deblasis
The text was updated successfully, but these errors were encountered: