From fd8b89e943da0294fe24db3f37c6996cd69d5497 Mon Sep 17 00:00:00 2001 From: Edwinhr716 Date: Wed, 28 Feb 2024 19:21:02 +0000 Subject: [PATCH] added fix for unit tests --- .../cloudprovider/gce/mig_info_provider_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/gce/mig_info_provider_test.go b/cluster-autoscaler/cloudprovider/gce/mig_info_provider_test.go index 4ecb4a1d828a..380ad7f4a8ae 100644 --- a/cluster-autoscaler/cloudprovider/gce/mig_info_provider_test.go +++ b/cluster-autoscaler/cloudprovider/gce/mig_info_provider_test.go @@ -916,14 +916,14 @@ func TestGetMigInstanceTemplateName(t *testing.T) { migLister := NewMigLister(tc.cache) provider := NewCachingMigInfoProvider(tc.cache, migLister, client, mig.GceRef().Project, 1, 0*time.Second) - templateName, err := provider.GetMigInstanceTemplateName(mig.GceRef()) - cachedTemplateName, found := tc.cache.GetMigInstanceTemplateName(mig.GceRef()) + instanceTemplateNameType, err := provider.GetMigInstanceTemplateName(mig.GceRef()) + cachedInstanceTemplateNameType, found := tc.cache.GetMigInstanceTemplateName(mig.GceRef()) assert.Equal(t, tc.expectedErr, err) assert.Equal(t, tc.expectedErr == nil, found) if tc.expectedErr == nil { - assert.Equal(t, tc.expectedTemplateName, templateName) - assert.Equal(t, tc.expectedTemplateName, cachedTemplateName) + assert.Equal(t, tc.expectedTemplateName, instanceTemplateNameType.Name) + assert.Equal(t, tc.expectedTemplateName, cachedInstanceTemplateNameType.Name) } }) }