mirror of
https://github.com/kairos-io/immucore.git
synced 2025-09-16 23:20:56 +00:00
Sort bind mounts (#134)
* Sort bind mounts Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com> * Add comment Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com> --------- Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
This commit is contained in:
@@ -19,6 +19,27 @@ var _ = Describe("mounting immutable setup", func() {
|
||||
Expect(g).ToNot(BeNil())
|
||||
})
|
||||
|
||||
Context("SortedBindMounts()", func() {
|
||||
It("returns the nodes with less depth first and in alfabetical order", func() {
|
||||
s := &mount.State{
|
||||
BindMounts: []string{
|
||||
"/etc/nginx/config.d/",
|
||||
"/etc/nginx",
|
||||
"/etc/kubernetes/child",
|
||||
"/etc/kubernetes",
|
||||
"/etc/kubernetes/child/grand-child",
|
||||
},
|
||||
}
|
||||
Expect(s.SortedBindMounts()).To(Equal([]string{
|
||||
"/etc/kubernetes",
|
||||
"/etc/nginx",
|
||||
"/etc/kubernetes/child",
|
||||
"/etc/nginx/config.d/",
|
||||
"/etc/kubernetes/child/grand-child",
|
||||
}))
|
||||
})
|
||||
})
|
||||
|
||||
Context("simple invocation", func() {
|
||||
It("generates normal dag", func() {
|
||||
Skip("Cant override bootstate yet")
|
||||
|
Reference in New Issue
Block a user