| Not to worry, I've since run the test and the icons are still all pegged to the one used for secret text. That icon is actually the default icon if the custom credentials descriptor does not implement the method
public String getIconClassName()
The most obvious route to fix this is to copy and paste what the Jenkins default credential implementations return in their descriptors. E.g. "icon-credentials-userpass" for UsernamePasswordCredentialsImpl. The problem is that I can't find the source of the icon class names they return: I presume a PNG with a matching name exists in some other part of the Jenkins codebase, but didn't find it. So while we could copy-paste the class names into this provider, we would get no warning if the names ever changed. |