1717package e2e
1818
1919import (
20- "context"
2120 "fmt"
2221 "strings"
2322 "time"
@@ -41,8 +40,8 @@ func cleanupNamespaceResources(namespace string) {
4140 err = cleanupHelmDeployments (namespace )
4241 Expect (err ).NotTo (HaveOccurred ())
4342
44- cleanupNode (ctx , clientSet )
45- cleanupNFDObjects (ctx , nfdClient , testNamespace .Name )
43+ cleanupNode (clientSet )
44+ cleanupNFDObjects (nfdClient , testNamespace .Name )
4645 cleanupCRDs ()
4746}
4847
@@ -145,7 +144,7 @@ func cleanupCRDs() {
145144
146145// cleanupNode deletes all NFD/GFD related metadata from the Node object, i.e.
147146// labels and annotations
148- func cleanupNode (ctx context. Context , cs clientset.Interface ) {
147+ func cleanupNode (cs clientset.Interface ) {
149148 // Per-node cleanup function
150149 cleanup := func (nodeName string ) error {
151150 node , err := cs .CoreV1 ().Nodes ().Get (ctx , nodeName , metav1.GetOptions {})
@@ -236,13 +235,13 @@ func cleanupNode(ctx context.Context, cs clientset.Interface) {
236235 }
237236}
238237
239- func cleanupNFDObjects (ctx context. Context , cli * nfdclient.Clientset , namespace string ) {
240- cleanupNodeFeatureRules (ctx , cli )
241- cleanupNodeFeatures (ctx , cli , namespace )
238+ func cleanupNFDObjects (cli * nfdclient.Clientset , namespace string ) {
239+ cleanupNodeFeatureRules (cli )
240+ cleanupNodeFeatures (cli , namespace )
242241}
243242
244243// cleanupNodeFeatures deletes all NodeFeature objects in the given namespace
245- func cleanupNodeFeatures (ctx context. Context , cli * nfdclient.Clientset , namespace string ) {
244+ func cleanupNodeFeatures (cli * nfdclient.Clientset , namespace string ) {
246245 nfs , err := cli .NfdV1alpha1 ().NodeFeatures (namespace ).List (ctx , metav1.ListOptions {})
247246 if errors .IsNotFound (err ) {
248247 // Omitted error, nothing to do.
@@ -264,7 +263,7 @@ func cleanupNodeFeatures(ctx context.Context, cli *nfdclient.Clientset, namespac
264263}
265264
266265// cleanupNodeFeatureRules deletes all NodeFeatureRule objects
267- func cleanupNodeFeatureRules (ctx context. Context , cli * nfdclient.Clientset ) {
266+ func cleanupNodeFeatureRules (cli * nfdclient.Clientset ) {
268267 nfrs , err := cli .NfdV1alpha1 ().NodeFeatureRules ().List (ctx , metav1.ListOptions {})
269268 if errors .IsNotFound (err ) {
270269 // Omitted error, nothing to do.
0 commit comments