mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #19954 from findkim/fix-provider-protocol-tests
Fix plugin protocol test
This commit is contained in:
commit
090da574a2
@ -203,6 +203,18 @@ func TestCheckProtocolVersions(t *testing.T) {
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
&response.TerraformProviderVersion{
|
||||
Protocols: []string{"4.0", "5.2"},
|
||||
},
|
||||
false,
|
||||
},
|
||||
{
|
||||
&response.TerraformProviderVersion{
|
||||
Protocols: []string{"5.0", "6.1"},
|
||||
},
|
||||
true,
|
||||
},
|
||||
}
|
||||
|
||||
server := testReleaseServer()
|
||||
@ -216,7 +228,6 @@ func TestCheckProtocolVersions(t *testing.T) {
|
||||
if err == nil {
|
||||
t.Fatal("succeeded; want error")
|
||||
}
|
||||
return
|
||||
} else if err != nil {
|
||||
t.Fatalf("unexpected error: %s", err)
|
||||
}
|
||||
@ -456,9 +467,10 @@ func TestProviderChecksum(t *testing.T) {
|
||||
// newProviderInstaller returns a minimally-initialized ProviderInstaller
|
||||
func newProviderInstaller(s *httptest.Server) ProviderInstaller {
|
||||
return ProviderInstaller{
|
||||
registry: registry.NewClient(Disco(s), nil),
|
||||
OS: runtime.GOOS,
|
||||
Arch: runtime.GOARCH,
|
||||
registry: registry.NewClient(Disco(s), nil),
|
||||
OS: runtime.GOOS,
|
||||
Arch: runtime.GOARCH,
|
||||
PluginProtocolVersion: 4,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user