How do I access the configuration variables present in settings.php through my code? I want to access the variables present in the settings.php in my custom module. For example, if the settings.php file contains the $config['test']['uid'] = 'ABC'; line, I want to access the content of $config['test']['uid'] in a controller.

How can I achieve this?
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.