Skip to content

Commit

Permalink
chore(tests): account for breaking API change, js_config was removed …
Browse files Browse the repository at this point in the history
…from browser application response
  • Loading branch information
sanderblue committed May 28, 2024
1 parent 095679c commit f51ebda
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ func TestAccNewRelicAgentApplicationBrowser(t *testing.T) {
),
Check: resource.ComposeTestCheckFunc(
testAccCheckNewRelicAgentApplicationBrowserExists(resourceName),
resource.TestCheckResourceAttrSet(resourceName, "js_config"),
resource.TestCheckResourceAttrSet(resourceName, "application_id"),
testAccCheckJsConfigNestedAttributes(resourceName, "js_config", []string{"init", "info", "loader_config"}),
),
},
// Test: Import
Expand Down Expand Up @@ -93,12 +90,13 @@ func testAccCheckNewRelicAgentApplicationBrowserExists(n string) resource.TestCh
client := testAccProvider.Meta().(*ProviderConfig).NewClient

// Provide a minimal delay to allow for the entity to be indexed.
time.Sleep(2 * time.Second)
time.Sleep(3 * time.Second)
result, err := client.Entities.GetEntity(common.EntityGUID(rs.Primary.ID))
if err != nil {
return err
}
if result != nil {

if result != nil && *result != nil {
if string((*result).GetGUID()) != rs.Primary.ID {
return fmt.Errorf("the browser agent application was not found %v - %v", (*result).GetGUID(), rs.Primary.ID)
}
Expand Down

0 comments on commit f51ebda

Please sign in to comment.