mirror of
https://github.com/mudler/LocalAI.git
synced 2024-06-07 19:40:48 +00:00
28 lines
511 B
Go
28 lines
511 B
Go
|
package api
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
|
||
|
. "github.com/onsi/ginkgo/v2"
|
||
|
. "github.com/onsi/gomega"
|
||
|
)
|
||
|
|
||
|
var _ = Describe("Test cases for config related functions", func() {
|
||
|
|
||
|
var (
|
||
|
configFile string
|
||
|
)
|
||
|
|
||
|
Context("Test Read configuration functions", func() {
|
||
|
configFile = os.Getenv("CONFIG_FILE")
|
||
|
It("Test ReadConfigFile", func() {
|
||
|
config, err := ReadConfigFile(configFile)
|
||
|
Expect(err).To(BeNil())
|
||
|
Expect(config).ToNot(BeNil())
|
||
|
// two configs in config.yaml
|
||
|
Expect(len(config)).To(Equal(2))
|
||
|
})
|
||
|
|
||
|
})
|
||
|
})
|