Skip to content

Commit

Permalink
added fix for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Edwinhr716 committed Mar 13, 2024
1 parent 145d286 commit fd8b89e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
}
Expand Down

0 comments on commit fd8b89e

Please sign in to comment.