Bird
0
0

Which of the following correctly sets a test API endpoint URL as an environment variable in a microservice's configuration file?

easy📝 Conceptual Q3 of 15
Microservices - Testing Microservices
Which of the following correctly sets a test API endpoint URL as an environment variable in a microservice's configuration file?
Atest_api_url = 'https://test.api.service.local'
Btest_api_url: https://test.api.service.local
CTEST_API_URL: https://test.api.service.local
DTEST_API_URL = "https://test.api.service.local"
Step-by-Step Solution
Solution:
  1. Step 1: Understand environment variable syntax

    Environment variables are typically uppercase and assigned with '=' in config files or shell scripts.
  2. Step 2: Evaluate options

    TEST_API_URL = "https://test.api.service.local" uses uppercase and '=' assignment correctly. Options B and C use colon syntax which is invalid for environment variables. test_api_url = 'https://test.api.service.local' uses lowercase and single quotes which is less standard.
  3. Final Answer:

    TEST_API_URL = "https://test.api.service.local" -> Option D
  4. Quick Check:

    Env vars use uppercase and '=' [OK]
Quick Trick: Env vars are uppercase with '=' assignment [OK]
Common Mistakes:
  • Using lowercase variable names
  • Using colon instead of '='
  • Using quotes inconsistently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes