@@ -15,8 +15,6 @@ import (
1515const disabledLog = "--log_level=disabled"
1616
1717func TestSnapshots (t * testing.T ) {
18- t .Skip ("Not persisting properly on CI" )
19-
2018 systest .Sut .ResetChain (t )
2119 cli := systest .NewCLIWrapper (t , systest .Sut , systest .Verbose )
2220 systest .Sut .StartChain (t )
@@ -28,7 +26,9 @@ func TestSnapshots(t *testing.T) {
2826
2927 node0Dir := systest .Sut .NodeDir (0 )
3028 command := "store"
31- restoreableDirs := []string {fmt .Sprintf ("%s/data/application.db" , node0Dir ), fmt .Sprintf ("%s/data/ss" , node0Dir )}
29+ restoreableDirs := []string {
30+ fmt .Sprintf ("%s/data/application.db" , node0Dir ),
31+ }
3232
3333 // export snapshot at height 5
3434 res := cli .RunCommandWithArgs (command , "export" , "--height=5" , fmt .Sprintf ("--home=%s" , node0Dir ), disabledLog )
@@ -52,19 +52,18 @@ func TestSnapshots(t *testing.T) {
5252 res = cli .RunCommandWithArgs (command , "load" , fmt .Sprintf ("%s/5-3.tar.gz" , node0Dir ), fmt .Sprintf ("--home=%s" , node0Dir ), disabledLog )
5353 require .DirExists (t , fmt .Sprintf ("%s/data/snapshots/5/3" , node0Dir ))
5454
55- // Restore from snapshots
55+ // Remove database
5656 for _ , dir := range restoreableDirs {
5757 require .NoError (t , os .RemoveAll (dir ))
5858 }
59- // Remove database
60- err := os .RemoveAll (fmt .Sprintf ("%s/data/application.db" , node0Dir ))
61- require .NoError (t , err )
62- require .NoError (t , os .RemoveAll (fmt .Sprintf ("%s/data/ss" , node0Dir )))
6359
60+ // Restore from snapshots
6461 res = cli .RunCommandWithArgs (command , "restore" , "5" , "3" , fmt .Sprintf ("--home=%s" , node0Dir ), disabledLog )
6562 for _ , dir := range restoreableDirs {
6663 require .DirExists (t , dir )
6764 }
65+ systest .Sut .StartChain (t )
66+ systest .Sut .AwaitNBlocks (t , 2 )
6867}
6968
7069func TestPrune (t * testing.T ) {
0 commit comments