From e40b9a40b266c9a25b9fdf514a013b02f2279703 Mon Sep 17 00:00:00 2001 From: Landan Cheruka <54340204+lcheruka@users.noreply.github.com> Date: Fri, 2 Oct 2020 16:50:12 -0400 Subject: [PATCH] fingerprint: changed unique.platform.azure.hostname to unique.platform.azure.name (#9016) --- client/fingerprint/env_azure.go | 2 +- client/fingerprint/env_azure_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/fingerprint/env_azure.go b/client/fingerprint/env_azure.go index 955d8dc1b..7d230fe37 100644 --- a/client/fingerprint/env_azure.go +++ b/client/fingerprint/env_azure.go @@ -138,7 +138,7 @@ func (f *EnvAzureFingerprint) Fingerprint(request *FingerprintRequest, response // marked as unique, the key isn't included in the computed node class. keys := map[string]AzureMetadataPair{ "id": {unique: true, path: "compute/vmId"}, - "hostname": {unique: true, path: "compute/name"}, + "name": {unique: true, path: "compute/name"}, // name might not be the same as hostname "location": {unique: false, path: "compute/location"}, "resource-group": {unique: false, path: "compute/resourceGroupName"}, "scale-set": {unique: false, path: "compute/vmScaleSetName"}, diff --git a/client/fingerprint/env_azure_test.go b/client/fingerprint/env_azure_test.go index 07b09dcbe..9bd0c9e02 100644 --- a/client/fingerprint/env_azure_test.go +++ b/client/fingerprint/env_azure_test.go @@ -108,7 +108,7 @@ func testFingerprint_Azure(t *testing.T, withExternalIp bool) { keys := []string{ "unique.platform.azure.id", - "unique.platform.azure.hostname", + "unique.platform.azure.name", "platform.azure.location", "platform.azure.resource-group", "platform.azure.scale-set", @@ -134,7 +134,7 @@ func testFingerprint_Azure(t *testing.T, withExternalIp bool) { } assertNodeAttributeEquals(t, response.Attributes, "unique.platform.azure.id", "13f56399-bd52-4150-9748-7190aae1ff21") - assertNodeAttributeEquals(t, response.Attributes, "unique.platform.azure.hostname", "demo01.internal") + assertNodeAttributeEquals(t, response.Attributes, "unique.platform.azure.name", "demo01.internal") assertNodeAttributeEquals(t, response.Attributes, "platform.azure.location", "eastus") assertNodeAttributeEquals(t, response.Attributes, "platform.azure.resource-group", "myrg") assertNodeAttributeEquals(t, response.Attributes, "platform.azure.scale-set", "nomad-clients")