@@ -48,27 +48,29 @@ func TestIntegrations(t *testing.T) {
4848 cliPath , err := e2e .AtlasCLIBin ()
4949 require .NoError (t , err )
5050
51- t .Run ("Create DATADOG" , func (t * testing.T ) {
52- cmd := exec .Command (cliPath ,
53- integrationsEntity ,
54- "create" ,
55- datadogEntity ,
56- "--apiKey" ,
57- key ,
58- "--projectId" ,
59- g .projectID ,
60- "-o=json" )
61- cmd .Env = os .Environ ()
62- resp , err := cmd .CombinedOutput ()
63-
64- a := assert .New (t )
65- a .NoError (err , string (resp ))
66-
67- var thirdPartyIntegrations mongodbatlas.ThirdPartyIntegrations
68- if err := json .Unmarshal (resp , & thirdPartyIntegrations ); a .NoError (err ) {
69- a .True (integrationExists (datadogEntity , thirdPartyIntegrations ))
70- }
71- })
51+ if ! Gov () { // cloudgov does not have an available datadog region
52+ t .Run ("Create DATADOG" , func (t * testing.T ) {
53+ cmd := exec .Command (cliPath ,
54+ integrationsEntity ,
55+ "create" ,
56+ datadogEntity ,
57+ "--apiKey" ,
58+ key ,
59+ "--projectId" ,
60+ g .projectID ,
61+ "-o=json" )
62+ cmd .Env = os .Environ ()
63+ resp , err := cmd .CombinedOutput ()
64+
65+ a := assert .New (t )
66+ a .NoError (err , string (resp ))
67+
68+ var thirdPartyIntegrations mongodbatlas.ThirdPartyIntegrations
69+ if err := json .Unmarshal (resp , & thirdPartyIntegrations ); a .NoError (err ) {
70+ a .True (integrationExists (datadogEntity , thirdPartyIntegrations ))
71+ }
72+ })
73+ }
7274
7375 t .Run ("Create NEW_RELIC" , func (t * testing.T ) {
7476 cmd := exec .Command (cliPath ,
@@ -212,7 +214,7 @@ func TestIntegrations(t *testing.T) {
212214 cmd := exec .Command (cliPath ,
213215 integrationsEntity ,
214216 "describe" ,
215- datadogEntity ,
217+ newRelicEntity ,
216218 "--projectId" ,
217219 g .projectID ,
218220 "-o=json" )
@@ -223,15 +225,15 @@ func TestIntegrations(t *testing.T) {
223225 a .NoError (err , string (resp ))
224226 var thirdPartyIntegration mongodbatlas.ThirdPartyIntegration
225227 if err := json .Unmarshal (resp , & thirdPartyIntegration ); a .NoError (err ) {
226- a .Equal (datadogEntity , thirdPartyIntegration .Type )
228+ a .Equal (newRelicEntity , thirdPartyIntegration .Type )
227229 }
228230 })
229231
230232 t .Run ("Delete" , func (t * testing.T ) {
231233 cmd := exec .Command (cliPath ,
232234 integrationsEntity ,
233235 "delete" ,
234- datadogEntity ,
236+ newRelicEntity ,
235237 "--force" ,
236238 "--projectId" ,
237239 g .projectID )
@@ -241,7 +243,7 @@ func TestIntegrations(t *testing.T) {
241243 a := assert .New (t )
242244 a .NoError (err , string (resp ))
243245
244- expected := fmt .Sprintf ("Integration '%s' deleted\n " , datadogEntity )
246+ expected := fmt .Sprintf ("Integration '%s' deleted\n " , newRelicEntity )
245247 a .Equal (expected , string (resp ))
246248 })
247249}
0 commit comments