@@ -459,25 +459,6 @@ func TestEnsureVmcpConfigConfigMap(t *testing.T) {
459459 },
460460 Spec : mcpv1beta1.VirtualMCPServerSpec {
461461 GroupRef : & mcpv1beta1.MCPGroupRef {Name : "test-group" },
462- SessionStorage : & mcpv1beta1.SessionStorageConfig {
463- Provider : mcpv1beta1 .SessionStorageProviderRedis ,
464- Address : "redis.default.svc.cluster.local:6379" ,
465- },
466- RateLimiting : & mcpv1beta1.RateLimitConfig {
467- PerUser : & mcpv1beta1.RateLimitBucket {
468- MaxTokens : 2 ,
469- RefillPeriod : metav1.Duration {Duration : time .Minute },
470- },
471- Tools : []mcpv1beta1.ToolRateLimitConfig {
472- {
473- Name : "backend_a_echo" ,
474- Shared : & mcpv1beta1.RateLimitBucket {
475- MaxTokens : 5 ,
476- RefillPeriod : metav1.Duration {Duration : time .Minute },
477- },
478- },
479- },
480- },
481462 },
482463 }
483464
@@ -527,16 +508,10 @@ func TestEnsureVmcpConfigConfigMap(t *testing.T) {
527508 assert .Contains (t , cm .Data , "config.yaml" )
528509 assert .NotEmpty (t , cm .Annotations ["toolhive.stacklok.dev/content-checksum" ])
529510
530- var cfg vmcpConfigMapConfig
511+ var cfg vmcpconfig. Config
531512 require .NoError (t , yaml .Unmarshal ([]byte (cm .Data ["config.yaml" ]), & cfg ))
532- require .NotNil (t , cfg .RateLimiting , "runtime config must include spec.rateLimiting" )
533-
534- require .NotNil (t , cfg .RateLimiting .PerUser )
535- assert .EqualValues (t , 2 , cfg .RateLimiting .PerUser .MaxTokens )
536- require .Len (t , cfg .RateLimiting .Tools , 1 )
537- assert .Equal (t , "backend_a_echo" , cfg .RateLimiting .Tools [0 ].Name )
538- require .NotNil (t , cfg .RateLimiting .Tools [0 ].Shared )
539- assert .EqualValues (t , 5 , cfg .RateLimiting .Tools [0 ].Shared .MaxTokens )
513+ assert .Equal (t , "test-vmcp" , cfg .Name )
514+ assert .Equal (t , "test-group" , cfg .Group )
540515}
541516
542517// TestSetAuthConfigConditions tests that auth config conditions reflect the current state
0 commit comments