How do I access the configuration variables present in settings.php through my code?
You can only override configuration values in settings.php, you cannot introduce new configuration. So the values you have tried to set there cannot be accessed, unless you happen to have configuration named test.uid. But I suspect that probably does not exist.