Skip to content

Commit 8773154

Browse files
authored
Merge pull request #293 from newrelic/rename_nri_host_id
rename HOST_ID into NRI_HOST_ID for unification
2 parents 132408d + b062b90 commit 8773154

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: args/args.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type DefaultArgumentList struct {
2121
Metadata bool `default:"false" help:"Add customer defined key-value attributes to the samples."`
2222
NriCluster string `default:"" help:"Optional. Cluster name"`
2323
NriService string `default:"" help:"Optional. Service name"`
24-
HostID string `default:"" help:"Optional. Host ID to be set in entity or/and in the payload"`
24+
NriHostID string `default:"" help:"Optional. Host ID to be set in entity or/and in the payload"`
2525
}
2626

2727
// All returns if all data should be published

Diff for: integration/integration.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ func (i *Integration) MarshalJSON() (output []byte, err error) {
173173
return
174174
}
175175

176-
// GetHostID returns HostID or an empty string if not set
176+
// GetHostID returns NriHostID or an empty string if not set
177177
func (i *Integration) GetHostID() string {
178178
defaultArgs := args.GetDefaultArgs(i.args)
179-
return defaultArgs.HostID
179+
return defaultArgs.NriHostID
180180
}
181181

182182
// toJSON serializes integration as JSON. If the pretty attribute is

Diff for: integration/integration_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,11 @@ func Test_Integration_HostId(t *testing.T) {
531531
},
532532
}
533533

534-
_ = os.Setenv("HOST_ID", "id-1234567890abc")
534+
_ = os.Setenv("NRI_HOST_ID", "id-1234567890abc")
535535

536536
// os.ClearEnv breaks tests in Windows that use the fileStorer because clears the user env vars
537537
defer func() {
538-
_ = os.Unsetenv("HOST_ID")
538+
_ = os.Unsetenv("NRI_HOST_ID")
539539
}()
540540

541541
i, err := New("TestIntegration", "1.0", Logger(log.Discard), Writer(w), Args(&arguments))

0 commit comments

Comments
 (0)