jiebi/CodeConvo huggingface dataset:
err := e2epod.WaitForPodSuccessInNamespace(f.ClientSet, verifyPod.Name, f.Namespace.Name) framework.ExpectNoError(err) }) <ins> ginkgo.It("should add resources for new huge page sizes on kubelet restart", func() { ginkgo.By("Stopping kubelet") startKubelet := stopKubelet() ginkgo.By(`Patching away support for hugepage resource "hugepages-2Mi"`) patch := []byte(`[{"op": "remove", "path": "/status/capacity/hugepages-2Mi"}, {"op": "remove", "path": "/status/allocatable/hugepages-2Mi"}]`) result := f.ClientSet.CoreV1().RESTClient().Patch(types.JSONPatchType).Resource("nodes").Name(framework.TestContext.NodeName).SubResource("status").Body(patch).Do(context.TODO()) framework.ExpectNoError(result.Error(), "while patching") ginkgo.By("Starting kubelet again") startKubelet() ginkgo.By("verifying that the hugepages-2Mi resource is present") gomega.Eventually(func() bool { node, err := f.ClientSet.CoreV1().Nodes().Get(context.TODO(), framework.TestContext.NodeName, metav1.GetOptions{}) framework.ExpectNoError(err, "while getting node status") _, isPresent := node.Status.Capacity["hugepages-2Mi"] return isPresent }, 30*time.Second, framework.Poll).Should(gomega.Equal(true)) }) </ins> } // Serial because the test updates kubelet configuration. var _ = SIGDescribe("HugePages [Serial] [Feature:HugePages][NodeFeature:HugePages]", func() { f := framework.NewDefaultFramework("hugepages-test") <ins> ginkgo.It("should remove resources for huge page sizes no longer supported", func() { ginkgo.By("mimicking support for 9Mi of 3Mi huge page memory by patching the node status") patch := []byte(`[{"op": "add", "path": "/status/capacity/hugepages-3Mi", "value": "9Mi"}, {"op": "add", "path": "/status/allocatable/hugepages-3Mi", "value": "9Mi"}]`) result := f.ClientSet.CoreV1().RESTClient().Patch(types.JSONPatchType).Resource("nodes").Name(framework.TestContext.NodeName).SubResource("status").Body(patch).Do(context.TODO()) framework.ExpectNoError(result.Error(), "while patching") node, err := f.ClientSet.CoreV1().Nodes().Get(context.TODO(), framework.TestContext.NodeName, metav1.GetOptions{}) framework.ExpectNoError(err, "while getting node status") ginkgo.By("Verifying that the node now supports huge pages with size 3Mi") value, ok := node.Status.Capacity["hugepages-3Mi"] framework.ExpectEqual(ok, true, "capacity should contain resouce hugepages-3Mi") framework.ExpectEqual(value.String(), "9Mi", "huge pages with size 3Mi should be supported") ginkgo.By("restarting the node and verifying that huge pages with size 3Mi are not supported") restartKubelet() ginkgo.By("verifying that the hugepages-3Mi resource no longer is present") gomega.Eventually(func() bool { node, err = f.ClientSet.CoreV1().Nodes().Get(context.TODO(), framework.TestContext.NodeName, metav1.GetOptions{}) framework.ExpectNoError(err, "while getting node status") _, isPresent := node.Status.Capacity["hugepages-3Mi"] return isPresent }, 30*time.Second, framework.Poll).Should(gomega.Equal(false)) }) </ins> ginkgo.Context("With config updated with hugepages feature enabled", func() { ginkgo.BeforeEach(func() { ginkgo.By("verifying hugepages are supported")
} // TODO: Find a uniform way to deal with systemctl/initctl/service operations. #34494 <del> func restartKubelet() { </del> <ins> func findRunningKubletServiceName() string { </ins> stdout, err := exec.Command("sudo", "systemctl", "list-units", "kubelet*", "--state=running").CombinedOutput() framework.ExpectNoError(err) regex := regexp.MustCompile("(kubelet-w+)") matches := regex.FindStringSubmatch(string(stdout)) <del> framework.ExpectNotEqual(len(matches), 0) kube := matches[0] framework.Logf("Get running kubelet with systemctl: %v, %v", string(stdout), kube) stdout, err = exec.Command("sudo", "systemctl", "restart", kube).CombinedOutput() </del> <ins> framework.ExpectNotEqual(len(matches), 0, "Found more than one kubelet service running: %q", stdout) kubeletServiceName := matches[0] framework.Logf("Get running kubelet with systemctl: %v, %v", string(stdout), kubeletServiceName) return kubeletServiceName } func restartKubelet() { kubeletServiceName := findRunningKubletServiceName() stdout, err := exec.Command("sudo", "systemctl", "restart", kubeletServiceName).CombinedOutput() </ins> framework.ExpectNoError(err, "Failed to restart kubelet with systemctl: %v, %v", err, stdout) } <ins> // stopKubelet will kill the running kubelet, and returns a func that will restart the process again func stopKubelet() func() { kubeletServiceName := findRunningKubletServiceName() stdout, err := exec.Command("sudo", "systemctl", "kill", kubeletServiceName).CombinedOutput() framework.ExpectNoError(err, "Failed to stop kubelet with systemctl: %v, %v", err, stdout) return func() { stdout, err := exec.Command("sudo", "systemctl", "start", kubeletServiceName).CombinedOutput() framework.ExpectNoError(err, "Failed to restart kubelet with systemctl: %v, %v", err, stdout) } } </ins> func toCgroupFsName(cgroupName cm.CgroupName) string { if framework.TestContext.KubeletConfig.CgroupDriver == "systemd" { return cgroupName.ToSystemd()
"//:all-srcs", ], outs = ["stable-metrics-list.yaml"], <del> cmd = "./$(locations :instrumentation) $(locations //:all-srcs) > $@", </del> <ins> cmd = "for loc in $(locations //:all-srcs); do echo $$loc; done | ./$(locations :instrumentation) - > $@", </ins> message = "Listing all stable metrics.", tools = [":instrumentation"], )
func main() { flag.Parse() if len(flag.Args()) < 1 { <del> fmt.Fprintf(os.Stderr, "USAGE: %s <DIR or FILE> [...]n", os.Args[0]) </del> <ins> fmt.Fprintf(os.Stderr, "USAGE: %s <DIR or FILE or '-'> [...]n", os.Args[0]) </ins> os.Exit(64) } stableMetrics := []metric{} errors := []error{} <ins> addStdin := false </ins> for _, arg := range flag.Args() { <ins> if arg == "-" { addStdin = true continue } </ins> ms, es := searchPathForStableMetrics(arg) stableMetrics = append(stableMetrics, ms...) errors = append(errors, es...) } <ins> if addStdin { scanner := bufio.NewScanner(os.Stdin) scanner.Split(bufio.ScanLines) for scanner.Scan() { arg := scanner.Text() ms, es := searchPathForStableMetrics(arg) stableMetrics = append(stableMetrics, ms...) errors = append(errors, es...) } } </ins> for _, err := range errors { fmt.Fprintf(os.Stderr, "%sn", err) }
Creates a replication controller to manage the created container(s). ``` <del> kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] </del> <ins> kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...] </ins> ``` ### Examples
* [kubectl](kubectl.md)	 - kubectl controls the Kubernetes cluster manager <del> ###### Auto generated by spf13/cobra on 6-Nov-2015 </del> <ins> ###### Auto generated by spf13/cobra on 10-Nov-2015 </ins> <!-- BEGIN MUNGE: GENERATED_ANALYTICS --> [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_run.md?pixel)]()
func NewCmdRun(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command { cmd := &cobra.Command{ <del> Use: "run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json]", </del> <ins> Use: "run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...]", </ins> // run-container is deprecated Aliases: []string{"run-container"}, Short:   "Run a particular image on the cluster.", Long:    run_long, Example: run_example, Run: func(cmd *cobra.Command, args []string) { <del> err := Run(f, cmdIn, cmdOut, cmdErr, cmd, args) </del> <ins> argsLenAtDash := cmd.ArgsLenAtDash() err := Run(f, cmdIn, cmdOut, cmdErr, cmd, args, argsLenAtDash) </ins> cmdutil.CheckErr(err) }, }
cmd.Flags().String("service-overrides", "", "An inline JSON override for the generated service object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.  Only used if --expose is true.") } <del> func Run(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *cobra.Command, args []string) error { </del> <ins> func Run(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *cobra.Command, args []string, argsLenAtDash int) error { </ins> if len(os.Args) > 1 && os.Args[1] == "run-container" { printDeprecationWarning("run", "run-container") } <del> if len(args) == 0 { </del> <ins> // Let kubectl run follow rules for `--`, see #13004 issue if len(args) == 0 || argsLenAtDash == 0 { </ins> return cmdutil.UsageError(cmd, "NAME is required for run") }
} } <ins> func TestRunArgsFollowDashRules(t *testing.T) { _, _, rc := testData() tests := []struct { args          []string argsLenAtDash int expectError   bool name          string }{ { args:          []string{}, argsLenAtDash: -1, expectError:   true, name:          "empty", }, { args:          []string{"foo"}, argsLenAtDash: -1, expectError:   false, name:          "no cmd", }, { args:          []string{"foo", "sleep"}, argsLenAtDash: -1, expectError:   false, name:          "cmd no dash", }, { args:          []string{"foo", "sleep"}, argsLenAtDash: 1, expectError:   false, name:          "cmd has dash", }, { args:          []string{"foo", "sleep"}, argsLenAtDash: 0, expectError:   true, name:          "no name", }, } for _, test := range tests { f, tf, codec := NewAPIFactory() tf.Client = &fake.RESTClient{ Codec: codec, Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { return &http.Response{StatusCode: 201, Body: objBody(codec, &rc.Items[0])}, nil }), } tf.Namespace = "test" tf.ClientConfig = &client.Config{} cmd := NewCmdRun(f, os.Stdin, os.Stdout, os.Stderr) cmd.Flags().Set("image", "nginx") err := Run(f, os.Stdin, os.Stdout, os.Stderr, cmd, test.args, test.argsLenAtDash) if test.expectError && err == nil { t.Errorf("unexpected non-error (%s)", test.name) } if !test.expectError && err != nil { t.Errorf("unexpected error: %v (%s)", err, test.name) } } } </ins> func TestGenerateService(t *testing.T) { tests := []struct {
for _, filesource := range filesources { data, err := filesource.ReadTestFile(filePath) if err != nil { <del> ginkgo.Fail(fmt.Sprintf("fatal error looking for test file %s: %s", filePath, err), 1) </del> <ins> e2elog.Fail(fmt.Sprintf("fatal error looking for test file %s: %s", filePath, err), 1) </ins> } if data != nil { return true
}) ginkgo.AfterEach(func() { <ins> defer func() { if expectedNodeCondition == v1.NodeDiskPressure && framework.TestContext.PrepullImages { // The disk eviction test may cause the prepulled images to be evicted, // prepull those images again to ensure this test not affect following tests. PrePullAllImages() } }() </ins> ginkgo.By("deleting pods") for _, spec := range testSpecs { ginkgo.By(fmt.Sprintf("deleting pod: %s", spec.pod.Name)) f.PodClient().DeleteSync(spec.pod.Name, &metav1.DeleteOptions{}, 10*time.Minute) } reduceAllocatableMemoryUsage() <del> if expectedNodeCondition == v1.NodeDiskPressure && framework.TestContext.PrepullImages { // The disk eviction test may cause the prepulled images to be evicted, // prepull those images again to ensure this test not affect following tests. PrePullAllImages() } </del> ginkgo.By("making sure we can start a new pod after the test") podName := "test-admit-pod" f.PodClient().CreateSync(&v1.Pod{
}, time.Minute*8, time.Second*4).ShouldNot(gomega.HaveOccurred()) }) ginkgo.AfterEach(func() { <ins> defer func() { if framework.TestContext.PrepullImages { // The test may cause the prepulled images to be evicted, // prepull those images again to ensure this test not affect following tests. PrePullAllImages() } }() </ins> ginkgo.By("delete the static pod") err := deleteStaticPod(podPath, staticPodName, ns) gomega.Expect(err).ShouldNot(gomega.HaveOccurred())
eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")}) cc := &CertificateController{ <ins> name:       name, </ins> kubeClient: kubeClient, queue: workqueue.NewNamedRateLimitingQueue(workqueue.NewMaxOfRateLimiter( workqueue.NewItemExponentialFailureRateLimiter(200*time.Millisecond, 1000*time.Second),
defer utilruntime.HandleCrash() defer cc.queue.ShutDown() <del> klog.Infof("Starting certificate controller") defer klog.Infof("Shutting down certificate controller") </del> <ins> klog.Infof("Starting certificate controller %q", cc.name) defer klog.Infof("Shutting down certificate controller %q", cc.name) </ins> <del> if !cache.WaitForNamedCacheSync("certificate", stopCh, cc.csrsSynced) { </del> <ins> if !cache.WaitForNamedCacheSync(fmt.Sprintf("certificate-%s", cc.name), stopCh, cc.csrsSynced) { </ins> return }
) const ( <del> // MaxUint defines the max unsigned int value. MaxUint = ^uint(0) // MaxInt defines the max signed int value. MaxInt = int(MaxUint >> 1) </del> // MaxTotalPriority defines the max total priority value. MaxTotalPriority = int64(math.MaxInt64) // MaxPriority defines the max priority value. MaxPriority = 10 // MaxWeight defines the max weight value. <del> MaxWeight = int64(math.MaxInt64 / MaxPriority) </del> <ins> MaxWeight = MaxTotalPriority / MaxPriority </ins> // DefaultPercentageOfNodesToScore defines the percentage of nodes of all nodes // that once found feasible, the scheduler stops looking for more nodes. DefaultPercentageOfNodesToScore = 50
expected    bool }{ { <del> description: "one of the weights is MaxInt64", configs:     []priorities.PriorityConfig{{Weight: math.MaxInt64}, {Weight: 5}}, </del> <ins> description: "one of the weights is MaxTotalPriority(MaxInt64)", configs:     []priorities.PriorityConfig{{Weight: api.MaxTotalPriority}, {Weight: 5}}, </ins> expected:    true, }, { description: "after multiplication with MaxPriority the weight is larger than MaxWeight", <del> configs:     []priorities.PriorityConfig{{Weight: math.MaxInt64/api.MaxPriority + api.MaxPriority}, {Weight: 5}}, </del> <ins> configs:     []priorities.PriorityConfig{{Weight: api.MaxWeight + api.MaxPriority}, {Weight: 5}}, </ins> expected:    true, }, {
flags.StringVar(&TestContext.KubernetesAnywherePath, "kubernetes-anywhere-path", "/workspace/k8s.io/kubernetes-anywhere", "Which directory kubernetes-anywhere is installed to.") flags.BoolVar(&TestContext.ListImages, "list-images", false, "If true, will show list of images used for runnning tests.") <ins> flags.StringVar(&TestContext.KubectlPath, "kubectl-path", "kubectl", "The kubectl binary to use. For development, you might use 'cluster/kubectl.sh' here.") </ins> } // RegisterClusterFlags registers flags specific to the cluster e2e test suite.
flags.StringVar(&TestContext.RepoRoot, "repo-root", "../../", "Root directory of kubernetes repository, for finding test files.") flags.StringVar(&TestContext.Provider, "provider", "", "The name of the Kubernetes provider (gce, gke, local, skeleton (the fallback if not set), etc.)") flags.StringVar(&TestContext.Tooling, "tooling", "", "The tooling in use (kops, gke, etc.)") <del> flags.StringVar(&TestContext.KubectlPath, "kubectl-path", "kubectl", "The kubectl binary to use. For development, you might use 'cluster/kubectl.sh' here.") </del> flags.StringVar(&TestContext.OutputDir, "e2e-output-dir", "/tmp", "Output directory for interesting/useful test data, like performance data, benchmarks, and other metrics.") flags.StringVar(&TestContext.Prefix, "prefix", "e2e", "A prefix to be added to cloud resources created during testing.") flags.StringVar(&TestContext.MasterOSDistro, "master-os-distro", "debian", "The OS distribution of cluster master (debian, ubuntu, gci, coreos, or custom).")
// attachFileDevice takes a path to a regular file and makes it available as an // attached block device. func attachFileDevice(path string, exec utilexec.Interface) (string, error) { <del> blockDevicePath, err := getLoopDevice(path, exec) </del> <ins> blockDevicePath, err := getLoopDevice(path) </ins> if err != nil && err.Error() != ErrDeviceNotFound { return "", err }
return "", fmt.Errorf("not attachable: %v", err) } <del> args := []string{"-j", path} out, err := exec.Command(losetupPath, args...).CombinedOutput() if err != nil { klog.V(2).Infof("Failed device discover command for path %s: %v", path, err) return "", err } return parseLosetupOutputForDevice(out) </del> <ins> return getLoopDeviceFromSysfs(path) </ins> } func makeLoopDevice(path string, exec utilexec.Interface) (string, error) { <del> args := []string{"-f", "-P", "--show", path} </del> <ins> args := []string{"-f", "-P", path} </ins> out, err := exec.Command(losetupPath, args...).CombinedOutput() if err != nil { <del> klog.V(2).Infof("Failed device create command for path %s: %v", path, err) </del> <ins> klog.V(2).Infof("Failed device create command for path %s: %v %s", path, err, out) </ins> return "", err } <del> return parseLosetupOutputForDevice(out) </del> <ins> return getLoopDeviceFromSysfs(path) </ins> } func removeLoopDevice(device string, exec utilexec.Interface) error {
return strings.HasPrefix(device, "/dev/loop") } <del> func parseLosetupOutputForDevice(output []byte) (string, error) { if len(output) == 0 { </del> <ins> // getLoopDeviceFromSysfs finds the backing file for a loop // device from sysfs via "/sys/block/loop*/loop/backing_file". func getLoopDeviceFromSysfs(path string) (string, error) { // If the file is a symlink. realPath, err := filepath.EvalSymlinks(path) if err != nil { </ins> return "", errors.New(ErrDeviceNotFound) } <del> // losetup returns device in the format: // /dev/loop1: [0073]:148662 (/var/lib/storageos/volumes/308f14af-cf0a-08ff-c9c3-b48104318e05) device := strings.TrimSpace(strings.SplitN(string(output), ":", 2)[0]) if len(device) == 0 { </del> <ins> devices, err := filepath.Glob("/sys/block/loop*") if err != nil { </ins> return "", errors.New(ErrDeviceNotFound) } <del> return device, nil </del> <ins> for _, device := range devices { backingFile := fmt.Sprintf("%s/loop/backing_file", device) // The contents of this file is the absolute path of "path". data, err := ioutil.ReadFile(backingFile) if err != nil { continue } // Return the first match. backingFilePath := strings.TrimSpace(string(data)) if backingFilePath == path || backingFilePath == realPath { return fmt.Sprintf("/dev/%s", filepath.Base(device)), nil } } return "", errors.New(ErrDeviceNotFound) </ins> }
return "", fmt.Errorf("not attachable: %v", err) } <del> args := []string{"-j", path} cmd := exec.Command(losetupPath, args...) out, err := cmd.CombinedOutput() if err != nil { klog.V(2).Infof("Failed device discover command for path %s: %v %s", path, err, out) return "", fmt.Errorf("losetup -j %s failed: %v", path, err) } return parseLosetupOutputForDevice(out, path) </del> <ins> return getLoopDeviceFromSysfs(path) </ins> } func makeLoopDevice(path string) (string, error) { <del> args := []string{"-f", "--show", path} </del> <ins> args := []string{"-f", path} </ins> cmd := exec.Command(losetupPath, args...) out, err := cmd.CombinedOutput() if err != nil { <del> klog.V(2).Infof("Failed device create command for path: %s %v %s ", path, err, out) return "", fmt.Errorf("losetup -f --show %s failed: %v", path, err) </del> <ins> klog.V(2).Infof("Failed device create command for path: %s %v %s", path, err, out) return "", fmt.Errorf("losetup %s failed: %v", strings.Join(args, " "), err) </ins> } <del> // losetup -f --show {path} returns device in the format: // /dev/loop1 if len(out) == 0 { return "", errors.New(ErrDeviceNotFound) } return strings.TrimSpace(string(out)), nil </del> <ins> return getLoopDeviceFromSysfs(path) </ins> } // removeLoopDevice removes specified loopback device
return nil } <del> func parseLosetupOutputForDevice(output []byte, path string) (string, error) { if len(output) == 0 { return "", errors.New(ErrDeviceNotFound) } </del> <ins> // getLoopDeviceFromSysfs finds the backing file for a loop // device from sysfs via "/sys/block/loop*/loop/backing_file". func getLoopDeviceFromSysfs(path string) (string, error) { // If the file is a symlink. </ins> realPath, err := filepath.EvalSymlinks(path) if err != nil { return "", fmt.Errorf("failed to evaluate path %s: %s", path, err) } <del> // losetup -j {path} returns device in the format: // /dev/loop1: [0073]:148662 ({path}) // /dev/loop2: [0073]:148662 (/dev/sdX) // // losetup -j shows all the loop device for the same device that has the same // major/minor number, by resolving symlink and matching major/minor number. // Therefore, there will be other path than {path} in output, as shown in above output. s := string(output) // Find the line that exact matches to the path, or "({path})" var matched string scanner := bufio.NewScanner(strings.NewReader(s)) for scanner.Scan() { // losetup output has symlinks expanded if strings.HasSuffix(scanner.Text(), "("+realPath+")") { matched = scanner.Text() break </del> <ins> devices, err := filepath.Glob("/sys/block/loop*") if err != nil { return "", fmt.Errorf("failed to list loop devices in sysfs: %s", err) } for _, device := range devices { backingFile := fmt.Sprintf("%s/loop/backing_file", device) // The contents of this file is the absolute path of "path". data, err := ioutil.ReadFile(backingFile) if err != nil { continue </ins> } <del> // Just in case losetup changes, check for the original path too if strings.HasSuffix(scanner.Text(), "("+path+")") { matched = scanner.Text() break </del> <ins> // Return the first match. backingFilePath := strings.TrimSpace(string(data)) if backingFilePath == path || backingFilePath == realPath { return fmt.Sprintf("/dev/%s", filepath.Base(device)), nil </ins> } } <del> if len(matched) == 0 { return "", errors.New(ErrDeviceNotFound) } s = matched // Get device name, or the 0th field of the output separated with ":". // We don't need 1st field or later to be splitted, so passing 2 to SplitN. device := strings.TrimSpace(strings.SplitN(s, ":", 2)[0]) if len(device) == 0 { return "", errors.New(ErrDeviceNotFound) } return device, nil </del> <ins> return "", errors.New(ErrDeviceNotFound) </ins> } // FindGlobalMapPathUUIDFromPod finds {pod uuid} bind mount under globalMapPath
import ( "context" <del> "k8s.io/api/core/v1" </del> <ins> v1 "k8s.io/api/core/v1" </ins> clientset "k8s.io/client-go/kubernetes" "k8s.io/kubernetes/test/e2e/framework" e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
ginkgo.Describe("NFSv4", func() { ginkgo.It("should be mountable for NFSv4", func() { config, _, serverIP := volume.NewNFSServer(c, namespace.Name, []string{}) <del> defer volume.TestCleanup(f, config) </del> <ins> defer volume.TestServerCleanup(f, config) </ins> tests := []volume.Test{ {
ginkgo.Describe("NFSv3", func() { ginkgo.It("should be mountable for NFSv3", func() { config, _, serverIP := volume.NewNFSServer(c, namespace.Name, []string{}) <del> defer volume.TestCleanup(f, config) </del> <ins> defer volume.TestServerCleanup(f, config) </ins> tests := []volume.Test{ {
config, _, _ := volume.NewGlusterfsServer(c, namespace.Name) name := config.Prefix + "-server" defer func() { <del> volume.TestCleanup(f, config) </del> <ins> volume.TestServerCleanup(f, config) </ins> err := c.CoreV1().Endpoints(namespace.Name).Delete(context.TODO(), name, nil) framework.ExpectNoError(err, "defer: Gluster delete endpoints failed") }()