• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

k8snetworkplumbingwg / sriov-network-operator / 13526205039

25 Feb 2025 04:34PM UTC coverage: 48.882% (+0.9%) from 48.008%
13526205039

Pull #788

github

web-flow
Merge 3e6b91cf3 into d7c9458e0
Pull Request #788: Daemon redesign - using controller-runtime

273 of 615 new or added lines in 18 files covered. (44.39%)

199 existing lines in 12 files now uncovered.

7324 of 14983 relevant lines covered (48.88%)

0.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

10.81
/pkg/client/clientset/versioned/typed/sriovnetwork/v1/fake/fake_sriovoperatorconfig.go
1
// Code generated by client-gen. DO NOT EDIT.
2

3
package fake
4

5
import (
6
        "context"
7

8
        sriovnetworkv1 "github.com/k8snetworkplumbingwg/sriov-network-operator/api/v1"
9
        v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10
        labels "k8s.io/apimachinery/pkg/labels"
11
        schema "k8s.io/apimachinery/pkg/runtime/schema"
12
        types "k8s.io/apimachinery/pkg/types"
13
        watch "k8s.io/apimachinery/pkg/watch"
14
        testing "k8s.io/client-go/testing"
15
)
16

17
// FakeSriovOperatorConfigs implements SriovOperatorConfigInterface
18
type FakeSriovOperatorConfigs struct {
19
        Fake *FakeSriovnetworkV1
20
        ns   string
21
}
22

23
var sriovoperatorconfigsResource = schema.GroupVersionResource{Group: "sriovnetwork.openshift.io", Version: "v1", Resource: "sriovoperatorconfigs"}
24

25
var sriovoperatorconfigsKind = schema.GroupVersionKind{Group: "sriovnetwork.openshift.io", Version: "v1", Kind: "SriovOperatorConfig"}
26

27
// Get takes name of the sriovOperatorConfig, and returns the corresponding sriovOperatorConfig object, and an error if there is any.
28
func (c *FakeSriovOperatorConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *sriovnetworkv1.SriovOperatorConfig, err error) {
1✔
29
        obj, err := c.Fake.
1✔
30
                Invokes(testing.NewGetAction(sriovoperatorconfigsResource, c.ns, name), &sriovnetworkv1.SriovOperatorConfig{})
1✔
31

1✔
32
        if obj == nil {
2✔
33
                return nil, err
1✔
34
        }
1✔
35
        return obj.(*sriovnetworkv1.SriovOperatorConfig), err
1✔
36
}
37

38
// List takes label and field selectors, and returns the list of SriovOperatorConfigs that match those selectors.
UNCOV
39
func (c *FakeSriovOperatorConfigs) List(ctx context.Context, opts v1.ListOptions) (result *sriovnetworkv1.SriovOperatorConfigList, err error) {
×
UNCOV
40
        obj, err := c.Fake.
×
UNCOV
41
                Invokes(testing.NewListAction(sriovoperatorconfigsResource, sriovoperatorconfigsKind, c.ns, opts), &sriovnetworkv1.SriovOperatorConfigList{})
×
UNCOV
42

×
UNCOV
43
        if obj == nil {
×
44
                return nil, err
×
45
        }
×
46

UNCOV
47
        label, _, _ := testing.ExtractFromListOptions(opts)
×
UNCOV
48
        if label == nil {
×
49
                label = labels.Everything()
×
50
        }
×
UNCOV
51
        list := &sriovnetworkv1.SriovOperatorConfigList{ListMeta: obj.(*sriovnetworkv1.SriovOperatorConfigList).ListMeta}
×
UNCOV
52
        for _, item := range obj.(*sriovnetworkv1.SriovOperatorConfigList).Items {
×
53
                if label.Matches(labels.Set(item.Labels)) {
×
54
                        list.Items = append(list.Items, item)
×
55
                }
×
56
        }
UNCOV
57
        return list, err
×
58
}
59

60
// Watch returns a watch.Interface that watches the requested sriovOperatorConfigs.
UNCOV
61
func (c *FakeSriovOperatorConfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
×
UNCOV
62
        return c.Fake.
×
UNCOV
63
                InvokesWatch(testing.NewWatchAction(sriovoperatorconfigsResource, c.ns, opts))
×
UNCOV
64

×
UNCOV
65
}
×
66

67
// Create takes the representation of a sriovOperatorConfig and creates it.  Returns the server's representation of the sriovOperatorConfig, and an error, if there is any.
68
func (c *FakeSriovOperatorConfigs) Create(ctx context.Context, sriovOperatorConfig *sriovnetworkv1.SriovOperatorConfig, opts v1.CreateOptions) (result *sriovnetworkv1.SriovOperatorConfig, err error) {
×
69
        obj, err := c.Fake.
×
70
                Invokes(testing.NewCreateAction(sriovoperatorconfigsResource, c.ns, sriovOperatorConfig), &sriovnetworkv1.SriovOperatorConfig{})
×
71

×
72
        if obj == nil {
×
73
                return nil, err
×
74
        }
×
75
        return obj.(*sriovnetworkv1.SriovOperatorConfig), err
×
76
}
77

78
// Update takes the representation of a sriovOperatorConfig and updates it. Returns the server's representation of the sriovOperatorConfig, and an error, if there is any.
79
func (c *FakeSriovOperatorConfigs) Update(ctx context.Context, sriovOperatorConfig *sriovnetworkv1.SriovOperatorConfig, opts v1.UpdateOptions) (result *sriovnetworkv1.SriovOperatorConfig, err error) {
×
80
        obj, err := c.Fake.
×
81
                Invokes(testing.NewUpdateAction(sriovoperatorconfigsResource, c.ns, sriovOperatorConfig), &sriovnetworkv1.SriovOperatorConfig{})
×
82

×
83
        if obj == nil {
×
84
                return nil, err
×
85
        }
×
86
        return obj.(*sriovnetworkv1.SriovOperatorConfig), err
×
87
}
88

89
// UpdateStatus was generated because the type contains a Status member.
90
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
91
func (c *FakeSriovOperatorConfigs) UpdateStatus(ctx context.Context, sriovOperatorConfig *sriovnetworkv1.SriovOperatorConfig, opts v1.UpdateOptions) (*sriovnetworkv1.SriovOperatorConfig, error) {
×
92
        obj, err := c.Fake.
×
93
                Invokes(testing.NewUpdateSubresourceAction(sriovoperatorconfigsResource, "status", c.ns, sriovOperatorConfig), &sriovnetworkv1.SriovOperatorConfig{})
×
94

×
95
        if obj == nil {
×
96
                return nil, err
×
97
        }
×
98
        return obj.(*sriovnetworkv1.SriovOperatorConfig), err
×
99
}
100

101
// Delete takes name of the sriovOperatorConfig and deletes it. Returns an error if one occurs.
102
func (c *FakeSriovOperatorConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
×
103
        _, err := c.Fake.
×
104
                Invokes(testing.NewDeleteAction(sriovoperatorconfigsResource, c.ns, name), &sriovnetworkv1.SriovOperatorConfig{})
×
105

×
106
        return err
×
107
}
×
108

109
// DeleteCollection deletes a collection of objects.
110
func (c *FakeSriovOperatorConfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
×
111
        action := testing.NewDeleteCollectionAction(sriovoperatorconfigsResource, c.ns, listOpts)
×
112

×
113
        _, err := c.Fake.Invokes(action, &sriovnetworkv1.SriovOperatorConfigList{})
×
114
        return err
×
115
}
×
116

117
// Patch applies the patch and returns the patched sriovOperatorConfig.
118
func (c *FakeSriovOperatorConfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *sriovnetworkv1.SriovOperatorConfig, err error) {
×
119
        obj, err := c.Fake.
×
120
                Invokes(testing.NewPatchSubresourceAction(sriovoperatorconfigsResource, c.ns, name, pt, data, subresources...), &sriovnetworkv1.SriovOperatorConfig{})
×
121

×
122
        if obj == nil {
×
123
                return nil, err
×
124
        }
×
125
        return obj.(*sriovnetworkv1.SriovOperatorConfig), err
×
126
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc