mirror of
https://github.com/rancher/plugins.git
synced 2025-09-06 17:17:46 +00:00
Windows: Updates Windows Vendoring
Updates windows dependent libraries for vendoing.
This commit is contained in:
62
vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport_test.go
generated
vendored
Normal file
62
vendor/github.com/Microsoft/hcsshim/hcn/hcnsupport_test.go
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
// +build integration
|
||||
|
||||
package hcn
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSupportedFeatures(t *testing.T) {
|
||||
supportedFeatures := GetSupportedFeatures()
|
||||
jsonString, err := json.Marshal(supportedFeatures)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fmt.Printf("Supported Features:\n%s \n", jsonString)
|
||||
}
|
||||
|
||||
func TestV2ApiSupport(t *testing.T) {
|
||||
supportedFeatures := GetSupportedFeatures()
|
||||
err := V2ApiSupported()
|
||||
if supportedFeatures.Api.V2 && err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !supportedFeatures.Api.V2 && err == nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRemoteSubnetSupport(t *testing.T) {
|
||||
supportedFeatures := GetSupportedFeatures()
|
||||
err := RemoteSubnetSupported()
|
||||
if supportedFeatures.RemoteSubnet && err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !supportedFeatures.RemoteSubnet && err == nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestHostRouteSupport(t *testing.T) {
|
||||
supportedFeatures := GetSupportedFeatures()
|
||||
err := HostRouteSupported()
|
||||
if supportedFeatures.HostRoute && err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !supportedFeatures.HostRoute && err == nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDSRSupport(t *testing.T) {
|
||||
supportedFeatures := GetSupportedFeatures()
|
||||
err := DSRSupported()
|
||||
if supportedFeatures.DSR && err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !supportedFeatures.DSR && err == nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user