Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Conversation

@XuefengHuang
Copy link
Contributor

I fix savestate error message issue and create a unit test for this PR, this is test result:

Xuefengs-MacBook-Pro:runnable Xuefeng$ python utf.py -f ut_seash_savestate_nicermessage.py 
Testing module: seash
Now starting subprocess: ut_seash_subprocess.py
Generating user keys...
Generating owner key...
Writing config file...
Writing vessel dictionary...
Now running setup script: ut_seash_setup.py
    Running: ut_seash_setup.py                                  [ PASS ]
    Running: ut_seash_savestate_nicermessage.py                 [ PASS ]
Now stopping subprocess: ut_seash_subprocess.py
Removing: v1
Removing: v10
Removing: v2
Removing: v3
Removing: v4
Removing: v5
Removing: v6
Removing: v7
Removing: v8
Removing: v9

Add better error messages for two problems. One is using savestate before having loaded at least a pubkey, and work as that identity. Another is using savestate to a write-protected file.
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work cross-platform (think Windows).

This unit test is to test error messages when using savestate before having loaded at least a pubkey, and work as that identity.
This unit test is to test error messages when using savestate to a write-protected file.
@asm582
Copy link

asm582 commented May 15, 2015

I have tested this pull request and this can be merged.

Testing by running unit test:

cib@cib-VirtualBox:/seash/RUNNABLE$ python utf.py -f ut_seash_savestate_nicermessageone.py
Testing module: seash
Running: ut_seash_savestate_nicermessageone.py [ PASS ]
cib@cib-VirtualBox:
/seash/RUNNABLE$ python utf.py -f ut_seash_savestate_nicermessagetwo.py
Testing module: seash
Running: ut_seash_savestate_nicermessagetwo.py [ PASS ]

Testing by manually entering command on seash:
cib@cib-VirtualBox:~/seash/RUNNABLE$ python seash.py

  • You can press the Tab key to enable tab complete when typing commands.

Enabled modules: factoids, geoip, modules, uploaddir, variables

!> savestate NO_KEYS_LOADED
Specify the key name by first typing 'as [username]'.
!> loadkeys guest0
as guest0
!> as guest0
guest0@ !> savestate write_protected_file
Permission denied: write_protected_file
guest0@ !> exit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants