Wrote rspec tests for live security group switching
Fixed some bugs in live security group switching that i found thanks to the unit test