Skip to content

Commit

Permalink
fix keys
Browse files Browse the repository at this point in the history
  • Loading branch information
bdevcich committed Dec 3, 2024
1 parent 4b4df1f commit 5e11ada
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions internal/controller/nnf_clientmount_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var _ = Describe("Clientmount Controller Test", func() {
Expect(m["mgtmdt"]).To(HaveLen(1))
Expect(m["mgtmdt"]).Should(ContainElements("rabbit-node-4"))

Expect(m["nnfNodes"]).To(HaveLen(5))
Expect(m["nnfNodes"]).Should(ContainElements("rabbit-node-1", "rabbit-node-2", "rabbit-node-3", "rabbit-node-4", "rabbit-node-8"))
Expect(m["nnfNode"]).To(HaveLen(5))
Expect(m["nnfNode"]).Should(ContainElements("rabbit-node-1", "rabbit-node-2", "rabbit-node-3", "rabbit-node-4", "rabbit-node-8"))
})
})
14 changes: 7 additions & 7 deletions internal/controller/nnf_storage_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ func (r *NnfStorageReconciler) Reconcile(ctx context.Context, req ctrl.Request)
MDTs: components["mdt"],
MGTs: components["mgt"],
MGTMDTs: components["mgtmdt"],
OSTs: components["osts"],
NNFNodes: components["nnfNodes"],
OSTs: components["ost"],
NNFNodes: components["nnfNode"],
}
}

Expand Down Expand Up @@ -1287,11 +1287,11 @@ func (r *NnfStorageReconciler) getLustreOST0(ctx context.Context, storage *nnfv1

func getLustreMappingFromStorage(storage *nnfv1alpha4.NnfStorage) map[string][]string {
componentMap := map[string][]string{
"mdt": {},
"mgt": {},
"mgtmdt": {},
"ost": {},
"nnfNodes": {},
"mdt": {},
"mgt": {},
"mgtmdt": {},
"ost": {},
"nnfNode": {},
}
rabbitMap := make(map[string]bool) // use a map to keep the list unique

Expand Down
4 changes: 2 additions & 2 deletions internal/controller/nnf_storage_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ var _ = Describe("NNFStorage Controller Test", func() {
Expect(m["mgtmdt"]).To(HaveLen(1))
Expect(m["mgtmdt"]).Should(ContainElements("rabbit-node-4"))

Expect(m["nnfNodes"]).To(HaveLen(5))
Expect(m["nnfNodes"]).Should(ContainElements("rabbit-node-1", "rabbit-node-2", "rabbit-node-3", "rabbit-node-4", "rabbit-node-8"))
Expect(m["nnfNode"]).To(HaveLen(5))
Expect(m["nnfNode"]).Should(ContainElements("rabbit-node-1", "rabbit-node-2", "rabbit-node-3", "rabbit-node-4", "rabbit-node-8"))
})
})

0 comments on commit 5e11ada

Please sign in to comment.