Skip to content

feat: add configuration management with environment variable parsing#22

Merged
fastrapier merged 1 commit into
mainfrom
feat/config
Jun 10, 2026
Merged

feat: add configuration management with environment variable parsing#22
fastrapier merged 1 commit into
mainfrom
feat/config

Conversation

@fastrapier

@fastrapier fastrapier commented Jun 8, 2026

Copy link
Copy Markdown
Member

This pull request introduces a new configuration package for handling cluster provider settings via environment variables, and adds comprehensive unit tests to ensure correct behavior. It also updates dependencies to support the new implementation.

New configuration package and tests:

  • Added pkg/config/config.go implementing a ClusterConfig struct with a ClusterProvider field, populated from the TEST_CLUSTER_PROVIDER environment variable using the caarlos0/env package. The New() function parses and validates this environment variable.
  • Added pkg/config/config_test.go with unit tests for config.New, covering parsing the provider, handling missing or empty values, and multiple provider value cases.

Dependency updates:

  • Added github.com/caarlos0/env/v11 and github.com/kelseyhightower/envconfig as indirect dependencies in go.mod to support environment variable parsing. [1] [2]

Documentation:

  • Updated docs/WORKLOG.md to document the addition of unit tests for config.New and its coverage areas.

@fastrapier fastrapier merged commit dbbe6ac into main Jun 10, 2026
2 checks passed
@fastrapier fastrapier deleted the feat/config branch June 10, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants