mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
Merge pull request #75225 from jingxu97/pd_windows_test
Add bracket to the sig-window tag and other fixes
This commit is contained in:
commit
11b9ebf113
@ -367,7 +367,7 @@ func (g *gcePDCSIDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) {
|
|||||||
if pattern.FsType == "xfs" {
|
if pattern.FsType == "xfs" {
|
||||||
framework.SkipUnlessNodeOSDistroIs("ubuntu", "custom")
|
framework.SkipUnlessNodeOSDistroIs("ubuntu", "custom")
|
||||||
}
|
}
|
||||||
if pattern.FeatureTag == "sig-windows" {
|
if pattern.FeatureTag == "[sig-windows]" {
|
||||||
framework.Skipf("Skipping tests for windows since CSI does not support it yet")
|
framework.Skipf("Skipping tests for windows since CSI does not support it yet")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -473,7 +473,7 @@ func (g *gcePDExternalCSIDriver) SkipUnsupportedTest(pattern testpatterns.TestPa
|
|||||||
if pattern.FsType == "xfs" {
|
if pattern.FsType == "xfs" {
|
||||||
framework.SkipUnlessNodeOSDistroIs("ubuntu", "custom")
|
framework.SkipUnlessNodeOSDistroIs("ubuntu", "custom")
|
||||||
}
|
}
|
||||||
if pattern.FeatureTag == "sig-windows" {
|
if pattern.FeatureTag == "[sig-windows]" {
|
||||||
framework.Skipf("Skipping tests for windows since CSI does not support it yet")
|
framework.Skipf("Skipping tests for windows since CSI does not support it yet")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1106,21 +1106,18 @@ var _ testsuites.DynamicPVTestDriver = &gcePdDriver{}
|
|||||||
|
|
||||||
// InitGcePdDriver returns gcePdDriver that implements TestDriver interface
|
// InitGcePdDriver returns gcePdDriver that implements TestDriver interface
|
||||||
func InitGcePdDriver() testsuites.TestDriver {
|
func InitGcePdDriver() testsuites.TestDriver {
|
||||||
var supportedTypes sets.String
|
// In current test structure, it first initialize the driver and then set up
|
||||||
var capFsGroup bool
|
// the new framework, so we cannot get the correct OS here. So here set to
|
||||||
if framework.NodeOSDistroIs("windows") {
|
// support all fs types including both linux and windows. We have code to check Node OS later
|
||||||
supportedTypes = sets.NewString("ntfs")
|
// during test.
|
||||||
capFsGroup = false
|
supportedTypes := sets.NewString(
|
||||||
} else {
|
"", // Default fsType
|
||||||
supportedTypes = sets.NewString(
|
"ext2",
|
||||||
"", // Default fsType
|
"ext3",
|
||||||
"ext2",
|
"ext4",
|
||||||
"ext3",
|
"xfs",
|
||||||
"ext4",
|
"ntfs",
|
||||||
"xfs",
|
)
|
||||||
)
|
|
||||||
capFsGroup = true
|
|
||||||
}
|
|
||||||
return &gcePdDriver{
|
return &gcePdDriver{
|
||||||
driverInfo: testsuites.DriverInfo{
|
driverInfo: testsuites.DriverInfo{
|
||||||
Name: "gcepd",
|
Name: "gcepd",
|
||||||
@ -1129,7 +1126,7 @@ func InitGcePdDriver() testsuites.TestDriver {
|
|||||||
SupportedMountOption: sets.NewString("debug", "nouid32"),
|
SupportedMountOption: sets.NewString("debug", "nouid32"),
|
||||||
Capabilities: map[testsuites.Capability]bool{
|
Capabilities: map[testsuites.Capability]bool{
|
||||||
testsuites.CapPersistence: true,
|
testsuites.CapPersistence: true,
|
||||||
testsuites.CapFsGroup: capFsGroup,
|
testsuites.CapFsGroup: true,
|
||||||
testsuites.CapBlock: true,
|
testsuites.CapBlock: true,
|
||||||
testsuites.CapExec: true,
|
testsuites.CapExec: true,
|
||||||
},
|
},
|
||||||
@ -1143,7 +1140,7 @@ func (g *gcePdDriver) GetDriverInfo() *testsuites.DriverInfo {
|
|||||||
|
|
||||||
func (g *gcePdDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) {
|
func (g *gcePdDriver) SkipUnsupportedTest(pattern testpatterns.TestPattern) {
|
||||||
framework.SkipUnlessProviderIs("gce", "gke")
|
framework.SkipUnlessProviderIs("gce", "gke")
|
||||||
if pattern.FeatureTag == "sig-windows" {
|
if pattern.FeatureTag == "[sig-windows]" {
|
||||||
framework.SkipUnlessNodeOSDistroIs("windows")
|
framework.SkipUnlessNodeOSDistroIs("windows")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,21 +152,21 @@ var (
|
|||||||
Name: "Inline-volume (ntfs)",
|
Name: "Inline-volume (ntfs)",
|
||||||
VolType: InlineVolume,
|
VolType: InlineVolume,
|
||||||
FsType: "ntfs",
|
FsType: "ntfs",
|
||||||
FeatureTag: "sig-windows",
|
FeatureTag: "[sig-windows]",
|
||||||
}
|
}
|
||||||
// NtfsPreprovisionedPV is TestPattern for "Pre-provisioned PV (ntfs)"
|
// NtfsPreprovisionedPV is TestPattern for "Pre-provisioned PV (ntfs)"
|
||||||
NtfsPreprovisionedPV = TestPattern{
|
NtfsPreprovisionedPV = TestPattern{
|
||||||
Name: "Pre-provisioned PV (ntfs)",
|
Name: "Pre-provisioned PV (ntfs)",
|
||||||
VolType: PreprovisionedPV,
|
VolType: PreprovisionedPV,
|
||||||
FsType: "ntfs",
|
FsType: "ntfs",
|
||||||
FeatureTag: "sig-windows",
|
FeatureTag: "[sig-windows]",
|
||||||
}
|
}
|
||||||
// NtfsDynamicPV is TestPattern for "Dynamic PV (xfs)"
|
// NtfsDynamicPV is TestPattern for "Dynamic PV (xfs)"
|
||||||
NtfsDynamicPV = TestPattern{
|
NtfsDynamicPV = TestPattern{
|
||||||
Name: "Dynamic PV (ntfs)",
|
Name: "Dynamic PV (ntfs)",
|
||||||
VolType: DynamicPV,
|
VolType: DynamicPV,
|
||||||
FsType: "ntfs",
|
FsType: "ntfs",
|
||||||
FeatureTag: "sig-windows",
|
FeatureTag: "[sig-windows]",
|
||||||
}
|
}
|
||||||
|
|
||||||
// Definitions for Filesystem volume mode
|
// Definitions for Filesystem volume mode
|
||||||
|
@ -125,7 +125,7 @@ func (t *volumeIOTestSuite) defineTests(driver TestDriver, pattern testpatterns.
|
|||||||
fileSizes := createFileSizes(dInfo.MaxFileSize)
|
fileSizes := createFileSizes(dInfo.MaxFileSize)
|
||||||
testFile := fmt.Sprintf("%s_io_test_%s", dInfo.Name, f.Namespace.Name)
|
testFile := fmt.Sprintf("%s_io_test_%s", dInfo.Name, f.Namespace.Name)
|
||||||
var fsGroup *int64
|
var fsGroup *int64
|
||||||
if dInfo.Capabilities[CapFsGroup] {
|
if !framework.NodeOSDistroIs("windows") && dInfo.Capabilities[CapFsGroup] {
|
||||||
fsGroupVal := int64(1234)
|
fsGroupVal := int64(1234)
|
||||||
fsGroup = &fsGroupVal
|
fsGroup = &fsGroupVal
|
||||||
}
|
}
|
||||||
|
@ -152,7 +152,7 @@ func (t *volumesTestSuite) defineTests(driver TestDriver, pattern testpatterns.T
|
|||||||
}
|
}
|
||||||
config := convertTestConfig(l.config)
|
config := convertTestConfig(l.config)
|
||||||
var fsGroup *int64
|
var fsGroup *int64
|
||||||
if dInfo.Capabilities[CapFsGroup] {
|
if framework.NodeOSDistroIs("windows") && dInfo.Capabilities[CapFsGroup] {
|
||||||
fsGroupVal := int64(1234)
|
fsGroupVal := int64(1234)
|
||||||
fsGroup = &fsGroupVal
|
fsGroup = &fsGroupVal
|
||||||
}
|
}
|
||||||
@ -185,7 +185,12 @@ func testScriptInPod(
|
|||||||
)
|
)
|
||||||
suffix := generateSuffixForPodName(volumeType)
|
suffix := generateSuffixForPodName(volumeType)
|
||||||
fileName := fmt.Sprintf("test-%s", suffix)
|
fileName := fmt.Sprintf("test-%s", suffix)
|
||||||
content := fmt.Sprintf("ls %s", volPath)
|
var content string
|
||||||
|
if framework.NodeOSDistroIs("windows") {
|
||||||
|
content = fmt.Sprintf("ls -n %s", volPath)
|
||||||
|
} else {
|
||||||
|
content = fmt.Sprintf("ls %s", volPath)
|
||||||
|
}
|
||||||
command := framework.GenerateWriteandExecuteScriptFileCmd(content, fileName, volPath)
|
command := framework.GenerateWriteandExecuteScriptFileCmd(content, fileName, volPath)
|
||||||
pod := &v1.Pod{
|
pod := &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Loading…
Reference in New Issue
Block a user