Self_test in ROS2?

Does ROS2 provide functionality equivalent to ROS1 self_test?

Not at the moment. None of the diagnostic functionality has been migrated yet.