Skip to content

Commit

Permalink
Revert "chore(changetracking): Skip feature-flagged custom attributes…
Browse files Browse the repository at this point in the history
… test (#1061)"

This reverts commit b215c6b.
  • Loading branch information
pranav-new-relic authored Nov 2, 2023
1 parent 1f997c2 commit c362ad5
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions pkg/changetracking/changetracking_api_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package changetracking

import (
"encoding/json"
"fmt"
"log"
"testing"
"time"
Expand All @@ -22,36 +21,6 @@ func TestChangeTrackingCreateDeployment_Basic(t *testing.T) {

a := newIntegrationTestClient(t)

input := ChangeTrackingDeploymentInput{
Changelog: "test",
Commit: "12345a",
DeepLink: "newrelic-client-go",
DeploymentType: ChangeTrackingDeploymentTypeTypes.BASIC,
Description: "This is a test description",
EntityGUID: common.EntityGUID(testhelpers.IntegrationTestApplicationEntityGUID),
GroupId: "deployment",
Timestamp: nrtime.EpochMilliseconds(time.Now()),
User: "newrelic-go-client",
Version: "0.0.1",
}

res, err := a.ChangeTrackingCreateDeployment(
ChangeTrackingDataHandlingRules{ValidationFlags: []ChangeTrackingValidationFlag{ChangeTrackingValidationFlagTypes.FAIL_ON_FIELD_LENGTH}},
input,
)
require.NoError(t, err)

require.NotNil(t, res)
require.Equal(t, res.EntityGUID, input.EntityGUID)
}

func TestChangeTrackingCreateDeployment_CustomAttributes(t *testing.T) {
skipMsg := fmt.Sprintf("Skipping %s until custom attributes are out of limited preview.", t.Name())
t.Skip(skipMsg)
t.Parallel()

a := newIntegrationTestClient(t)

var customAttributes = `{"a":"1","b":"two","c":"1.5","d":"true"}`
attrs := make(map[string]interface{})
err := json.Unmarshal([]byte(customAttributes), &attrs)
Expand All @@ -62,7 +31,7 @@ func TestChangeTrackingCreateDeployment_CustomAttributes(t *testing.T) {
input := ChangeTrackingDeploymentInput{
Changelog: "test",
Commit: "12345a",
CustomAttributes: ChangeTrackingRawCustomAttributesMap(attrs),
CustomAttributes: attrs,
DeepLink: "newrelic-client-go",
DeploymentType: ChangeTrackingDeploymentTypeTypes.BASIC,
Description: "This is a test description",
Expand Down

0 comments on commit c362ad5

Please sign in to comment.