SeattleTestbed / seash

Interactive vessel management tool
MIT License
0 stars 10 forks source link

Fix for issue #89(Improve `savestate` error handling) #92

Open XuefengHuang opened 9 years ago

XuefengHuang commented 9 years ago

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
asm582 commented 9 years ago

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

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