Normally, a rated power pilot does not need to take the knowledge test when adding a glider rating onto an existing certificate.
The only exception is if the certificate is an upgrade. That is, going from a private pilot to a commercial pilot certificate, for example.