func skipInternalf(caller int, format string, args ...interface{ … } // Skipf skips with information about why the test is being skipped. // The direct caller is recorded in the callstack. func Skipf(format string, args ...interface{ … } var Skip … // SkipUnlessAtLeast skips if the value is less than the minValue. func SkipUnlessAtLeast(value int, minValue int, message string) { … } var featureGate … // InitFeatureGates must be called in test suites that have a --feature-gates parameter. // If not called, SkipUnlessFeatureGateEnabled will record a test failure. func InitFeatureGates(defaults featuregate.FeatureGate, overrides map[string]bool) error { … } // IsFeatureGateEnabled can be used during e2e tests to figure out if a certain feature gate is enabled. // This function is dependent on InitFeatureGates under the hood. Therefore, the test must be called with a // --feature-gates parameter. func IsFeatureGateEnabled(feature featuregate.Feature) bool { … } // SkipUnlessFeatureGateEnabled skips if the feature is disabled. // // Beware that this only works in test suites that have a --feature-gate // parameter and call InitFeatureGates. In test/e2e, the `Feature: XYZ` tag // has to be used instead and invocations have to make sure that they // only run tests that work with the given test cluster. func SkipUnlessFeatureGateEnabled(gate featuregate.Feature) { … } // SkipUnlessNodeCountIsAtLeast skips if the number of nodes is less than the minNodeCount. func SkipUnlessNodeCountIsAtLeast(minNodeCount int) { … } // SkipUnlessNodeCountIsAtMost skips if the number of nodes is greater than the maxNodeCount. func SkipUnlessNodeCountIsAtMost(maxNodeCount int) { … } // SkipIfProviderIs skips if the provider is included in the unsupportedProviders. func SkipIfProviderIs(unsupportedProviders ...string) { … } // SkipUnlessProviderIs skips if the provider is not included in the supportedProviders. func SkipUnlessProviderIs(supportedProviders ...string) { … } // SkipUnlessMultizone skips if the cluster does not have multizone. func SkipUnlessMultizone(ctx context.Context, c clientset.Interface) { … } // SkipUnlessAtLeastNZones skips if the cluster does not have n multizones. func SkipUnlessAtLeastNZones(ctx context.Context, c clientset.Interface, n int) { … } // SkipIfMultizone skips if the cluster has multizone. func SkipIfMultizone(ctx context.Context, c clientset.Interface) { … } // SkipUnlessMasterOSDistroIs skips if the master OS distro is not included in the supportedMasterOsDistros. func SkipUnlessMasterOSDistroIs(supportedMasterOsDistros ...string) { … } // SkipUnlessNodeOSDistroIs skips if the node OS distro is not included in the supportedNodeOsDistros. func SkipUnlessNodeOSDistroIs(supportedNodeOsDistros ...string) { … } // SkipUnlessNodeOSArchIs skips if the node OS distro is not included in the supportedNodeOsArchs. func SkipUnlessNodeOSArchIs(supportedNodeOsArchs ...string) { … } // SkipIfNodeOSDistroIs skips if the node OS distro is included in the unsupportedNodeOsDistros. func SkipIfNodeOSDistroIs(unsupportedNodeOsDistros ...string) { … } // SkipUnlessServerVersionGTE skips if the server version is less than v. func SkipUnlessServerVersionGTE(v *utilversion.Version, c discovery.ServerVersionInterface) { … } // SkipUnlessSSHKeyPresent skips if no SSH key is found. func SkipUnlessSSHKeyPresent() { … } // serverVersionGTE returns true if v is greater than or equal to the server version. func serverVersionGTE(v *utilversion.Version, c discovery.ServerVersionInterface) (bool, error) { … } var AppArmorDistros … // SkipIfAppArmorNotSupported skips if the AppArmor is not supported by the node OS distro. func SkipIfAppArmorNotSupported() { … } // SkipUnlessComponentRunsAsPodsAndClientCanDeleteThem run if the component run as pods and client can delete them func SkipUnlessComponentRunsAsPodsAndClientCanDeleteThem(ctx context.Context, componentName string, c clientset.Interface, ns string, labelSet labels.Set) { … } // SkipIfIPv6 skips if the cluster IP family is IPv6 and the provider is included in the unsupportedProviders. func SkipIfIPv6(unsupportedProviders ...string) { … }