I agree that having the endpoint_type hardcoded is not ideal, so this should be fixed.
However I disagree about the assumption that non-admin tests cannot be run against an admin URL.
Which API is exposed in which URL type is really a deployer decision, and access to the different URL is controlled via network configuration / firewall rather than OpenStack configuration.
When testing a public cloud it is possible that the admin URL is not accessible to the persons running the tests, so the identity client should honour the endpoint_type.
I agree that having the endpoint_type hardcoded is not ideal, so this should be fixed.
However I disagree about the assumption that non-admin tests cannot be run against an admin URL.
Which API is exposed in which URL type is really a deployer decision, and access to the different URL is controlled via network configuration / firewall rather than OpenStack configuration.
When testing a public cloud it is possible that the admin URL is not accessible to the persons running the tests, so the identity client should honour the endpoint_type.