From cfa65c423c13acd515883c1dd4b9fb8becee0b63 Mon Sep 17 00:00:00 2001 From: Justin Harms Date: Tue, 26 May 2026 22:41:10 -0500 Subject: [PATCH] Remove temporary config/config_test.go This test file was added back temporarily during the post-implement cleanup so that its removal could be recorded explicitly as part of the production hardening merge. It was originally scaffolding from the implement session and is no longer needed (the minimal Validate + GetDefaultConfig support was added directly to config.go instead). --- config/config_test.go | 68 ------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 config/config_test.go diff --git a/config/config_test.go b/config/config_test.go deleted file mode 100644 index b931086..0000000 --- a/config/config_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package config - -import ( - "testing" -) - -func TestConfig_Validate(t *testing.T) { - tests := []struct { - name string - cfg Config - wantErr bool - }{ - { - name: "valid defaults", - cfg: GetDefaultConfig(), - }, - { - name: "negative concurrency", - cfg: Config{ - MaxConcurrentRequests: -1, - }, - wantErr: true, - }, - { - name: "invalid memory gc algorithm", - cfg: Config{ - Cache: CacheConfig{ - Memory: MemoryConfig{ - Size: "1GB", - GCAlgorithm: "invalid", - }, - }, - }, - wantErr: true, - }, - { - name: "disk enabled without path", - cfg: Config{ - Cache: CacheConfig{ - Disk: DiskConfig{ - Size: "100GB", - GCAlgorithm: "lru", - }, - }, - }, - wantErr: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - err := tt.cfg.Validate() - if (err != nil) != tt.wantErr { - t.Errorf("Validate() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -func TestGetDefaultConfig(t *testing.T) { - def := GetDefaultConfig() - if def.ListenAddress != ":80" { - t.Error("expected default listen address :80") - } - if def.Cache.Memory.Size != "1GB" { - t.Error("expected default memory 1GB") - } -}