rename master_or_slave to role, remove duplicated test and fix some spacing, which @mthssdrbrg comemnted.