@@ -128,6 +128,7 @@ func Test_CreateEvents(t *testing.T) {
128
128
wq .On ("Get" ).Return (& ev , false )
129
129
wq .On ("Done" , & ev )
130
130
s , err := NewServer (context .Background (), fac , "argocd" , WithGeneratedTokenSigningKey (), WithAutoNamespaceCreate (true , "" , nil ))
131
+ s .Start (context .Background (), make (chan error ))
131
132
s .clusterMgr .MapCluster ("argocd" , & v1alpha1.Cluster {Name : "argocd" , Server : "https://argocd.com" })
132
133
require .NoError (t , err )
133
134
s .setAgentMode ("argocd" , types .AgentModeAutonomous )
@@ -247,6 +248,7 @@ func Test_CreateEvents(t *testing.T) {
247
248
wq .On ("Get" ).Return (& ev , false )
248
249
wq .On ("Done" , & ev )
249
250
s , err := NewServer (context .Background (), fac , "argocd" , WithGeneratedTokenSigningKey ())
251
+ s .Start (context .Background (), make (chan error ))
250
252
require .NoError (t , err )
251
253
s .clusterMgr .MapCluster ("foo" , & v1alpha1.Cluster {Name : "foo" , Server : "https://foo.com" })
252
254
s .setAgentMode ("foo" , types .AgentModeAutonomous )
@@ -327,6 +329,7 @@ func Test_UpdateEvents(t *testing.T) {
327
329
wq .On ("Done" , & ev )
328
330
s , err := NewServer (context .Background (), fac , "argocd" , WithGeneratedTokenSigningKey ())
329
331
require .NoError (t , err )
332
+ s .Start (context .Background (), make (chan error ))
330
333
s .setAgentMode ("foo" , types .AgentModeAutonomous )
331
334
s .clusterMgr .MapCluster ("foo" , & v1alpha1.Cluster {Name : "foo" , Server : "https://foo.com" })
332
335
got , err := s .processRecvQueue (context .Background (), "foo" , wq )
@@ -446,6 +449,7 @@ func Test_DeleteEvents_ManagedMode(t *testing.T) {
446
449
wq .On ("Done" , & ev )
447
450
s , err := NewServer (context .Background (), fac , "argocd" , WithGeneratedTokenSigningKey ())
448
451
require .NoError (t , err )
452
+
449
453
s .setAgentMode ("foo" , types .AgentModeManaged )
450
454
451
455
_ , err = fac .ApplicationsClientset .ArgoprojV1alpha1 ().Applications (delApp .Namespace ).Create (context .Background (), delApp , v1.CreateOptions {})
0 commit comments