File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,25 @@ public void DaprSidecarCanReferenceComponents()
111111 Assert . Contains ( referenceAnnotations , a => a . Component . Name == "pubsub" ) ;
112112 }
113113
114+ [ Fact ]
115+ public void ResourceWithDaprSidecarAndNoWaitAnnotations_CreatesBasicSidecar ( )
116+ {
117+ var builder = DistributedApplication . CreateBuilder ( ) ;
118+
119+ var app = builder . AddProject < Projects . CommunityToolkit_Aspire_Hosting_Dapr_ServiceA > ( "test" )
120+ . WithDaprSidecar ( ) ;
121+
122+ // Verify no wait annotations on the main resource
123+ Assert . Empty ( app . Resource . Annotations . OfType < WaitAnnotation > ( ) ) ;
124+
125+ // Verify the sidecar resource exists
126+ var sidecarResource = Assert . Single ( builder . Resources . OfType < DaprSidecarResource > ( ) ) ;
127+
128+ // Verify the sidecar is properly linked
129+ var sidecarAnnotation = Assert . Single ( app . Resource . Annotations . OfType < DaprSidecarAnnotation > ( ) ) ;
130+ Assert . Equal ( sidecarResource , sidecarAnnotation . Sidecar ) ;
131+ }
132+
114133 [ Fact ]
115134 public void ResourceWithWaitAnnotationAndDaprSidecar_SetsUpCorrectDependencies ( )
116135 {
You can’t perform that action at this time.
0 commit comments