fix tests and add missing tests for when security context is missing