nautobot_controller_test.go reconcile test fails — missing nautobotSecretRef setup
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start in nautobot_controller_test.go at the failing reconcile test around line 79, and run make test to reproduce it. Create a Secret in the test namespace and set the Nautobot CR's nautobotSecretRef to reference it; the test is done when reconciliation succeeds.
Written by the indexing model from the issue text.
Description
Description
The scaffolded test in
nautobot_controller_test.go creates a Nautobot CR without setting nautobotSecretRef and expects Reconcile to succeed. It fails with:
failed to get nautobot auth token {"error": "nautobotSecretRef "" is missing a namespace"}
Steps to Reproduce
make test
The failing test is:
Nautobot Controller When reconciling a resource [It] should successfully reconcile the resource
nautobot_controller_test.go:79
Root Cause
The test creates a bare Nautobot CR with no spec fields populated:
resource := &syncv1alpha1.Nautobot{
ObjectMeta: metav1.ObjectMeta{
Name: resourceName,
Namespace: "default",
},
}
When Reconcile runs, it reaches getAuthTokenFromSecretRef which requires nautobotSecretRef.Name and nautobotSecretRef.Namespace to be set.
Expected Fix
Provide a valid nautobotSecretRef — create a Secret in the test namespace and reference it in the CR spec
- Dominant language
- Python
- Stars
- 13
- Forks
- 12
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 73
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rackerlabs/understack
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
rackerlabs/understack#2346 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
rackerlabs/understack#2343 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 68/100
rackerlabs/understack#2342 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 72/100
rackerlabs/understack#2335 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
rackerlabs/understack#2330 · 3 comments ·
All issues in rackerlabs/understack
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100