mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-19 09:48:32 -05:00
fix: TestEnsureProviders using the wrong line breaks and PackageDir separator (#3273)
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d280ab1d6b
commit
f5ef40c37c
3
.gitattributes
vendored
3
.gitattributes
vendored
@@ -1,4 +1,5 @@
|
||||
internal/**/*.tf text eol=lf
|
||||
internal/**/*.tofu text eol=lf
|
||||
internal/**/*.json text eol=lf
|
||||
internal/**/*.tmpl text eol=lf
|
||||
internal/**/*.tmpl text eol=lf
|
||||
internal/providercache/testdata/**/* text eol=lf
|
||||
@@ -1037,7 +1037,7 @@ func TestEnsureProviderVersions(t *testing.T) {
|
||||
LocalDir string
|
||||
}{
|
||||
"2.1.0",
|
||||
filepath.Join(dir.BasePath(), "example.com/foo/beep/2.1.0/bleep_bloop"),
|
||||
filepath.ToSlash(filepath.Join(dir.BasePath(), "example.com/foo/beep/2.1.0/bleep_bloop")),
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1109,10 +1109,11 @@ func TestEnsureProviderVersions(t *testing.T) {
|
||||
}
|
||||
|
||||
gotEntry := dir.ProviderLatestVersion(beepProvider)
|
||||
|
||||
wantEntry := &CachedProvider{
|
||||
Provider: beepProvider,
|
||||
Version: getproviders.MustParseVersion("2.1.0"),
|
||||
PackageDir: filepath.Join(dir.BasePath(), "example.com/foo/beep/2.1.0/bleep_bloop"),
|
||||
PackageDir: filepath.ToSlash(filepath.Join(dir.BasePath(), "example.com/foo/beep/2.1.0/bleep_bloop")),
|
||||
}
|
||||
if diff := cmp.Diff(wantEntry, gotEntry); diff != "" {
|
||||
t.Errorf("wrong cache entry\n%s", diff)
|
||||
|
||||
Reference in New Issue
Block a user