Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak committed Dec 12, 2023
1 parent 4e8a267 commit 7c0144a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion controllers/ebpf/agent_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (c *AgentController) Reconcile(ctx context.Context, target *flowslatest.Flo
ctx = log.IntoContext(ctx, rlog)
current, err := c.current(ctx)
if err != nil {
return fmt.Errorf("fetching current EBPF Agent: %w", err)
return fmt.Errorf("fetching current eBPF agent: %w", err)
}
if !helper.UseEBPF(&target.Spec) || c.PreviousPrivilegedNamespace() != c.PrivilegedNamespace() {
if current == nil {
Expand Down
4 changes: 2 additions & 2 deletions controllers/flowcollector_controller_certificates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func flowCollectorCertificatesSpecs() {
Namespace: operatorNamespace,
DeploymentModel: flowslatest.DeploymentModelKafka,
Agent: flowslatest.FlowCollectorAgent{
Type: "EBPF",
Type: "eBPF",
},
Loki: flowslatest.FlowCollectorLoki{
Enable: ptr.To(true),
Expand Down Expand Up @@ -186,7 +186,7 @@ func flowCollectorCertificatesSpecs() {
},
},
SASL: flowslatest.SASLConfig{
Type: "PLAIN",
Type: "Plain",
ClientIDReference: flowslatest.FileReference{
Type: flowslatest.RefTypeSecret,
Name: kafka2Sasl.Name,
Expand Down
4 changes: 2 additions & 2 deletions controllers/flowcollector_controller_ebpf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func flowCollectorEBPFSpecs() {
LogLevel: "error",
},
Agent: flowslatest.FlowCollectorAgent{
Type: "EBPF",
Type: "eBPF",
EBPF: flowslatest.FlowCollectorEBPF{
Sampling: ptr.To(int32(123)),
CacheActiveTimeout: "15s",
Expand Down Expand Up @@ -281,7 +281,7 @@ func flowCollectorEBPFKafkaSpecs() {
ObjectMeta: metav1.ObjectMeta{Name: crKey.Name},
Spec: flowslatest.FlowCollectorSpec{
Namespace: operatorNamespace,
Agent: flowslatest.FlowCollectorAgent{Type: "EBPF"},
Agent: flowslatest.FlowCollectorAgent{Type: "eBPF"},
DeploymentModel: flowslatest.DeploymentModelKafka,
Kafka: flowslatest.FlowCollectorKafka{
Address: "kafka-cluster-kafka-bootstrap",
Expand Down
12 changes: 6 additions & 6 deletions controllers/flowcollector_controller_iso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func flowCollectorIsoSpecs() {
LogLevel: "trace",
Resources: v1.ResourceRequirements{Limits: nil, Requests: nil},
KafkaConsumerReplicas: &zero,
KafkaConsumerAutoscaler: flowslatest.FlowCollectorHPA{Status: "DISABLED", MinReplicas: &zero, MaxReplicas: zero, Metrics: []ascv2.MetricSpec{}},
KafkaConsumerAutoscaler: flowslatest.FlowCollectorHPA{Status: "Disabled", MinReplicas: &zero, MaxReplicas: zero, Metrics: []ascv2.MetricSpec{}},
KafkaConsumerQueueCapacity: int(zero),
KafkaConsumerBatchSize: int(zero),
ConversationHeartbeatInterval: &metav1.Duration{Duration: time.Second},
Expand All @@ -79,7 +79,7 @@ func flowCollectorIsoSpecs() {
Server: flowslatest.MetricsServerConfig{
Port: 12347,
TLS: flowslatest.ServerTLS{
Type: "DISABLED",
Type: "Disabled",
Provided: nil,
},
},
Expand All @@ -89,7 +89,7 @@ func flowCollectorIsoSpecs() {
DropUnusedFields: ptr.To(false),
},
Agent: flowslatest.FlowCollectorAgent{
Type: "EBPF",
Type: "eBPF",
IPFIX: flowslatest.FlowCollectorIPFIX{
Sampling: 2, // 0 is forbidden here
CacheActiveTimeout: "5s",
Expand Down Expand Up @@ -127,7 +127,7 @@ func flowCollectorIsoSpecs() {
ImagePullPolicy: "Always",
Resources: v1.ResourceRequirements{Limits: nil, Requests: nil},
LogLevel: "trace",
Autoscaler: flowslatest.FlowCollectorHPA{Status: "DISABLED", MinReplicas: &zero, MaxReplicas: zero, Metrics: []ascv2.MetricSpec{}},
Autoscaler: flowslatest.FlowCollectorHPA{Status: "Disabled", MinReplicas: &zero, MaxReplicas: zero, Metrics: []ascv2.MetricSpec{}},
PortNaming: flowslatest.ConsolePluginPortConfig{
Enable: ptr.To(false),
PortNames: map[string]string{},
Expand All @@ -142,7 +142,7 @@ func flowCollectorIsoSpecs() {
QuerierURL: "http://loki",
StatusURL: "",
TenantID: "test",
AuthToken: "DISABLED",
AuthToken: "Disabled",
TLS: defaultTLS,
StatusTLS: defaultTLS,
},
Expand Down Expand Up @@ -174,7 +174,7 @@ func flowCollectorIsoSpecs() {
Topic: "topic",
TLS: defaultTLS,
SASL: flowslatest.SASLConfig{
Type: "DISABLED",
Type: "Disabled",
ClientIDReference: flowslatest.FileReference{
Type: "configmap",
Name: "",
Expand Down

0 comments on commit 7c0144a

Please sign in to comment.