Files
cunicu/pkg/config/order_test.go
Steffen Vogel 3bee839348 fix: Update copyright years
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2025-01-01 22:45:39 +01:00

28 lines
499 B
Go

// SPDX-FileCopyrightText: 2023-2025 Steffen Vogel <post@steffenvogel.de>
// SPDX-License-Identifier: Apache-2.0
package config_test
import (
"cunicu.li/cunicu/pkg/config"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = It("Can extract interface order", func() {
cfg := `---
interfaces:
f:
c:
b:
a:
d:
e:
`
order, err := config.ExtractInterfaceOrder([]byte(cfg))
Expect(err).To(Succeed())
Expect(order).To(Equal([]string{"f", "c", "b", "a", "d", "e"}))
})