@@ -23,48 +23,48 @@ func CheckIntegrationInstall(t *testing.T, client *TestClient) {
2323 freezeContent , err := client .FileManager .ReadFile (requirementIntegrationPath )
2424 require .NoError (t , err )
2525
26- freezeContent = ciliumRegex .ReplaceAll (freezeContent , []byte ("datadog-cilium==2.2.1 " ))
26+ freezeContent = ciliumRegex .ReplaceAll (freezeContent , []byte ("datadog-cilium==4.0.0 " ))
2727 _ , err = client .FileManager .WriteFile (requirementIntegrationPath , freezeContent )
2828 require .NoError (t , err )
2929
3030 t .Run ("install-uninstall package" , func (tt * testing.T ) {
31- installIntegration (tt , client , "datadog-cilium==2.2.1 " )
31+ installIntegration (tt , client , "datadog-cilium==4.0.0 " )
3232
3333 freezeRequirement := client .AgentClient .Integration (agentclient .WithArgs ([]string {"freeze" }))
34- require .Contains (tt , freezeRequirement , "datadog-cilium==2.2.1 " , "before removal integration should be in freeze" )
34+ require .Contains (tt , freezeRequirement , "datadog-cilium==4.0.0 " , "before removal integration should be in freeze" )
3535
3636 client .AgentClient .Integration (agentclient .WithArgs ([]string {"remove" , "-r" , "datadog-cilium" }))
3737
3838 freezeRequirementNew := client .AgentClient .Integration (agentclient .WithArgs ([]string {"freeze" }))
39- require .NotContains (tt , freezeRequirementNew , "datadog-cilium==2.2.1 " , "after removal integration should not be in freeze" )
39+ require .NotContains (tt , freezeRequirementNew , "datadog-cilium==4.0.0 " , "after removal integration should not be in freeze" )
4040 })
4141
4242 t .Run ("upgrade a package" , func (tt * testing.T ) {
43- installIntegration (tt , client , "datadog-cilium==2.2.1 " )
43+ installIntegration (tt , client , "datadog-cilium==4.0.0 " )
4444
4545 freezeRequirement := client .AgentClient .Integration (agentclient .WithArgs ([]string {"freeze" }))
46- require .NotContains (tt , freezeRequirement , "datadog-cilium==2.3 .0" , "before update integration should not be in 2.3 .0" )
46+ require .NotContains (tt , freezeRequirement , "datadog-cilium==5.0 .0" , "before update integration should not be in 5.0 .0" )
4747
48- installIntegration (tt , client , "datadog-cilium==2.3 .0" )
48+ installIntegration (tt , client , "datadog-cilium==5.0 .0" )
4949
5050 freezeRequirementNew := client .AgentClient .Integration (agentclient .WithArgs ([]string {"freeze" }))
51- require .Contains (tt , freezeRequirementNew , "datadog-cilium==2.3 .0" , "after update integration should be in 2.3 .0" )
51+ require .Contains (tt , freezeRequirementNew , "datadog-cilium==5.0 .0" , "after update integration should be in 5.0 .0" )
5252 })
5353
5454 t .Run ("downgrade a package" , func (tt * testing.T ) {
55- installIntegration (tt , client , "datadog-cilium==2.3 .0" )
55+ installIntegration (tt , client , "datadog-cilium==5.0 .0" )
5656
5757 freezeRequirement := client .AgentClient .Integration (agentclient .WithArgs ([]string {"freeze" }))
58- require .NotContains (tt , freezeRequirement , "datadog-cilium==2.2.1 " , "before downgrade integration should not be in 2.2.1 " )
58+ require .NotContains (tt , freezeRequirement , "datadog-cilium==4.0.0 " , "before downgrade integration should not be in 4.0.0 " )
5959
60- installIntegration (tt , client , "datadog-cilium==2.2.1 " )
60+ installIntegration (tt , client , "datadog-cilium==4.0.0 " )
6161
6262 freezeRequirementNew := client .AgentClient .Integration (agentclient .WithArgs ([]string {"freeze" }))
63- require .Contains (tt , freezeRequirementNew , "datadog-cilium==2.2.1 " , "after downgrade integration should be in 2.2.1 " )
63+ require .Contains (tt , freezeRequirementNew , "datadog-cilium==4.0.0 " , "after downgrade integration should be in 4.0.0 " )
6464 })
6565
6666 t .Run ("downgrade to older version than shipped" , func (tt * testing.T ) {
67- _ , err := client .AgentClient .IntegrationWithError (agentclient .WithArgs ([]string {"install" , "-r" , "datadog-cilium==2.2 .0" }))
67+ _ , err := client .AgentClient .IntegrationWithError (agentclient .WithArgs ([]string {"install" , "-r" , "datadog-cilium==3.6 .0" }))
6868 require .Error (tt , err , "should raise error when trying to install version older than the one shipped" )
6969 })
7070}
0 commit comments