Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
adpat test
Browse files Browse the repository at this point in the history
  • Loading branch information
DockToFuture committed Aug 15, 2018
1 parent 51ddc2c commit acb0f72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions cmd/miscellaneous_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

var _ = Describe("Miscellaneous", func() {
var gardenClusters GardenClusters
var gardenConf GardenConfig
var target Target
dumpPath := "/tmp"
pathTarget := dumpPath + "/target2"
Expand All @@ -19,14 +19,15 @@ var _ = Describe("Miscellaneous", func() {
if err != nil {
panic(err)
}
gardenConfig := `
gConfig := `
githubURL: https://github.croft.gardener.corp
gardenClusters:
- name: dev
kubeConfig: /tmp/kubeconfig.yaml
- name: prod
kubeConfig: /tmp/kubeconfig.yaml
`
content := []byte(gardenConfig)
content := []byte(gConfig)
file.Write(content)
err = file.Close()
if err != nil {
Expand All @@ -51,9 +52,9 @@ gardenClusters:
})
Context("After calling GetGardenClusters", func() {
It("GardenCluster Name should be dev ", func() {
GetGardenClusters(pathGardenConfig, &gardenClusters)
Expect(gardenClusters.GardenClusters[0].Name).To(Equal("dev"))
Expect(gardenClusters.GardenClusters[1].Name).To(Equal("prod"))
GetGardenConfig(pathGardenConfig, &gardenConf)
Expect(gardenConf.GardenClusters[0].Name).To(Equal("dev"))
Expect(gardenConf.GardenClusters[1].Name).To(Equal("prod"))
})
})

Expand Down

0 comments on commit acb0f72

Please sign in to comment.