Skip to content

Commit 06ac2a7

Browse files
fix match string for chainsaw tests
1 parent 197dc99 commit 06ac2a7

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

internal/controller/iprange_controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func (r *IpRangeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
166166
}
167167

168168
if err = r.EventStatusRecorder.Report(ctx, o, netboxv1.ConditionIpRangeReadyFalse,
169-
corev1.EventTypeWarning, err, fmt.Sprintf("%s-%s ", o.Spec.StartAddress, o.Spec.EndAddress)); err != nil {
169+
corev1.EventTypeWarning, err, fmt.Sprintf("range: %s-%s", o.Spec.StartAddress, o.Spec.EndAddress)); err != nil {
170170
return ctrl.Result{}, err
171171
}
172172

internal/controller/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (esr *EventStatusRecorder) Report(ctx context.Context, o ObjectWithConditio
8989
logger := log.FromContext(ctx)
9090

9191
if errExt != nil {
92-
condition.Message = condition.Message + ", " + errExt.Error()
92+
condition.Message = condition.Message + ": " + errExt.Error()
9393
logger.Error(errExt, condition.Message)
9494
}
9595

tests/e2e/Prefix/IPv4/prefixclaim-ipv4-invalid-parentprefixselector/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
reason: ParentPrefixNotSelected
4646
source:
4747
component: prefix-claim-controller
48-
message: "The parent prefix was not able to be selected. no parent prefix can be obtained with the query conditions set in ParentPrefixSelector, err = failed to fetch tenant 'niltenant': not found, number of candidates = 0"
48+
message: "The parent prefix was not able to be selected, no parent prefix can be obtained with the query conditions set in ParentPrefixSelector, err = failed to fetch tenant 'niltenant': not found, number of candidates = 0"
4949
involvedObject:
5050
apiVersion: netbox.dev/v1
5151
kind: PrefixClaim

tests/e2e/Prefix/IPv4/prefixclaim-ipv4-prefixexhausted/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ spec:
9494
reason: PrefixCRNotCreated
9595
source:
9696
component: prefix-claim-controller
97-
message: Failed to fetch new Prefix from NetBox. parent prefix exhausted, will restart the parent prefix selection process
97+
message: Failed to fetch new Prefix from NetBox, parent prefix exhausted, will restart the parent prefix selection process
9898
involvedObject:
9999
apiVersion: netbox.dev/v1
100100
kind: PrefixClaim

tests/e2e/ipaddress/ipv4/ipaddressclaim-ipv4-prefixexhausted/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ spec:
129129
reason: IPAddressCRNotCreated
130130
source:
131131
component: ip-address-claim-controller
132-
message: Failed to fetch new IP from NetBox. parent prefix exhausted
132+
message: "Failed to fetch new IP from NetBox: parent prefix exhausted"
133133
involvedObject:
134134
apiVersion: netbox.dev/v1
135135
kind: IpAddressClaim

tests/e2e/ipaddress/ipv6/ipaddressclaim-ipv6-prefixexhausted/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ spec:
129129
reason: IPAddressCRNotCreated
130130
source:
131131
component: ip-address-claim-controller
132-
message: Failed to fetch new IP from NetBox. parent prefix exhausted
132+
message: "Failed to fetch new IP from NetBox: parent prefix exhausted"
133133
involvedObject:
134134
apiVersion: netbox.dev/v1
135135
kind: IpAddressClaim

tests/e2e/iprange/ipv4/iprangeclaim-ipv4-invalid-customfieldnotexisting/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
reason: FailedToReserveIPRangeInNetbox
5656
source:
5757
component: ip-range-controller
58-
message: Failed to reserve IP Range in NetBox. 3.2.3.1/32-3.2.3.30/32 . Check the logs for more information.
58+
message: "Failed to reserve IP Range in NetBox: failed to reserve IP Range: [POST /ipam/ip-ranges/][400] ipam_ip-ranges_create default map[__all__:[Unknown field name 'justmade' in custom field data.]], range: 3.2.3.1/32-3.2.3.30/32"
5959
involvedObject:
6060
apiVersion: netbox.dev/v1
6161
kind: IpRange

tests/e2e/iprange/ipv4/iprangeclaim-ipv4-invalid-customfieldwrongdatatype/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
reason: FailedToReserveIPRangeInNetbox
5656
source:
5757
component: ip-range-controller
58-
message: Failed to reserve IP Range in NetBox. 3.2.3.1/32-3.2.3.30/32 . Check the logs for more information.
58+
message: "Failed to reserve IP Range in NetBox: failed to reserve IP Range: [POST /ipam/ip-ranges/][400] ipam_ip-ranges_create default map[__all__:[Unknown field name 'cfDataTypeInteger' in custom field data.]], range: 3.2.3.1/32-3.2.3.30/32"
5959
involvedObject:
6060
apiVersion: netbox.dev/v1
6161
kind: IpRange

tests/e2e/iprange/ipv4/iprangeclaim-ipv4-invalid-parentprefix/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ spec:
3030
reason: IPRangeCRNotCreated
3131
source:
3232
component: ip-range-claim-controller
33-
message: Failed to fetch new IP Range from NetBox. Check the logs for more information.
33+
message: "Failed to fetch new IP Range from NetBox: failed to fetch parent prefix: not found"
3434
involvedObject:
3535
apiVersion: netbox.dev/v1
3636
kind: IpRangeClaim

tests/e2e/iprange/ipv4/iprangeclaim-ipv4-invalid-tenant/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636
reason: IPRangeCRNotCreated
3737
source:
3838
component: ip-range-claim-controller
39-
message: Failed to fetch new IP Range from NetBox. Check the logs for more information.
39+
message: "Failed to fetch new IP Range from NetBox: failed to fetch tenant 'nonexistingtenant': not found"
4040
involvedObject:
4141
apiVersion: netbox.dev/v1
4242
kind: IpRangeClaim

tests/e2e/iprange/ipv4/iprangeclaim-ipv4-prefixexhausted/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ spec:
138138
reason: IPRangeCRNotCreated
139139
source:
140140
component: ip-range-claim-controller
141-
message: Failed to fetch new IP Range from NetBox. Check the logs for more information.
141+
message: "Failed to fetch new IP Range from NetBox: not enough consecutive IPs available"
142142
involvedObject:
143143
apiVersion: netbox.dev/v1
144144
kind: IpRangeClaim

tests/e2e/iprange/ipv6/iprangeclaim-ipv6-prefixexhausted/chainsaw-test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ spec:
139139
reason: IPRangeCRNotCreated
140140
source:
141141
component: ip-range-claim-controller
142-
message: Failed to fetch new IP Range from NetBox. Check the logs for more information.
142+
message: "Failed to fetch new IP Range from NetBox: not enough consecutive IPs available"
143143
involvedObject:
144144
apiVersion: netbox.dev/v1
145145
kind: IpRangeClaim

0 commit comments

Comments
 (0)