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

Migration tests are missing something #332

Closed
roman-khimov opened this issue Apr 13, 2023 · 4 comments
Closed

Migration tests are missing something #332

roman-khimov opened this issue Apr 13, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@roman-khimov
Copy link
Member

We've got a number of YmFsbG90cw== ("ballots") storage entries in mainnet-3309907-storage.csv which means that migration should fail like this:

Error: deploy contract: script failed (FAULT state) due to an error: at instruction 71 (SYSCALL): failed native call: at instruction 807 (THROW): unhandled exception: "pending vote detected"

However this doesn't happen in migration tests.

@roman-khimov roman-khimov added the bug Something isn't working label Apr 13, 2023
@roman-khimov
Copy link
Member Author

Even though #333 allows to proceed with update, we better investigate it at the testing system level, why does it work this way?

@cthulhu-rider
Copy link
Contributor

cthulhu-rider commented Apr 14, 2023

However this doesn't happen in migration tests.

what do u expect? Test checks that with existing ballots pending vote detected panic occurs. If this panic - test OK, otherwise FAIL

if notaryDisabled && prevPendingVote {
c.CheckUpdateFail(t, "pending vote detected", notary)
return
}

I changed check to CheckUpdateSuccess and got

--- FAIL: TestMigration (0.18s)
=== RUN   TestMigration/mainnet-3309907/container
    basic.go:213: 
...
        	Error:      	Not equal: 
        	            	expected: 0x1
        	            	actual  : 0x2
        	Test:       	TestMigration/mainnet-3309907/container
        	Messages:   	at instruction 71 (SYSCALL): failed native call: at instruction 1240 (THROW): unhandled exception: "pending vote detected"

@cthulhu-rider
Copy link
Contributor

I'll add ballot age check to all tests.

@roman-khimov
Copy link
Member Author

roman-khimov commented Apr 14, 2023

I had expected at least a single complete successful run for mainnet. It probably doesn't worth the trouble now, this code will never be executed again.

@roman-khimov roman-khimov closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants