mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-27 13:15:00 +00:00
Add more testcases
Signed-off-by: Aisuko <urakiny@gmail.com>
This commit is contained in:
parent
2c91837865
commit
6748ba7379
7 changed files with 33 additions and 76 deletions
27
api/config_test.go
Normal file
27
api/config_test.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
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))
|
||||
})
|
||||
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue