Merge pull request #85002 from oomichi/cleanup-util

Remove unused function from e2e framework util.go
This commit is contained in:
Kubernetes Prow Robot 2019-11-08 13:49:12 -08:00 committed by GitHub
commit 6569bc736f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2363,20 +2363,6 @@ func GetClusterZones(c clientset.Interface) (sets.String, error) {
return zones, nil
}
// WaitForNodeHasTaintOrNot waits for a taint to be added/removed from the node until timeout occurs, whichever comes first.
func WaitForNodeHasTaintOrNot(c clientset.Interface, nodeName string, taint *v1.Taint, wantTrue bool, timeout time.Duration) error {
if err := wait.PollImmediate(Poll, timeout, func() (bool, error) {
has, err := NodeHasTaint(c, nodeName, taint)
if err != nil {
return false, fmt.Errorf("Failed to check taint %s on node %s or not", taint.ToString(), nodeName)
}
return has == wantTrue, nil
}); err != nil {
return fmt.Errorf("expect node %v to have taint = %v within %v: %v", nodeName, wantTrue, timeout, err)
}
return nil
}
// GetFileModeRegex returns a file mode related regex which should be matched by the mounttest pods' output.
// If the given mask is nil, then the regex will contain the default OS file modes, which are 0644 for Linux and 0775 for Windows.
func GetFileModeRegex(filePath string, mask *int32) string {