Archived
bump to v0.2.0: complete provider implementation with live-tested DNS record types
ci / test (push) Failing after 5m55s
ci / test (push) Failing after 5m55s
- DYNU_API_KEY env var fallback in provider config - dynu_domain resource: add 9 computed attributes (unicode_name, ipv4/ipv6 flags, wildcard aliases, allow_zone_transfer, dnssec, created_on, updated_on) - dynu_dns_records data source: add 6 type-specific fields (priority, weight, port, flags, tag, value) - Fix normalizeRecordContentForState for MX/SRV/NS/PTR (read host field) and CAA (read value field) to avoid plan/state inconsistency - Allow underscore-prefixed DNS labels in hostname validator (RFC 2782 SRV) - Preserve plan/state hostname across create/update/read to prevent inconsistent result errors when API returns full FQDN for node_name-style records - Update all version references from 0.1.0 to 0.2.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LFZyrmtKsezBwFWGTWsb2y
This commit is contained in:
1 parent
12b8f2460d
commit
70bb75ad46
17 files changed
+159
-35
No files matched your search
@@ -16,16 +16,23 @@ func TestResolveAPIKey(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
config types.String
|
||||
envVal string
|
||||
want string
|
||||
}{
|
||||
{name: "configured", config: types.StringValue("config-key"), want: "config-key"},
|
||||
{name: "null when missing", config: types.StringNull(), want: ""},
|
||||
{name: "trim spaces", config: types.StringValue(" config-key "), want: "config-key"},
|
||||
{name: "unknown when pending", config: types.StringUnknown(), want: ""},
|
||||
{name: "env var fallback when null", config: types.StringNull(), envVal: "env-key", want: "env-key"},
|
||||
{name: "config takes priority over env", config: types.StringValue("config-key"), envVal: "env-key", want: "config-key"},
|
||||
{name: "env var fallback when unknown", config: types.StringUnknown(), envVal: "env-key", want: "env-key"},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
if tc.envVal != "" {
|
||||
t.Setenv("DYNU_API_KEY", tc.envVal)
|
||||
}
|
||||
if got := resolveAPIKey(tc.config); got != tc.want {
|
||||
t.Fatalf("resolveAPIKey() = %q, want %q", got, tc.want)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user