-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1315 from merico-dev/feat-apps-cicd-pass-vars
feat: pass variable from ci to cd
- Loading branch information
Showing
26 changed files
with
690 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,47 @@ | ||
package configmanager | ||
|
||
import ( | ||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
var _ = Describe("Config struct", func() { | ||
var ( | ||
c *Config | ||
toolName, instanceID string | ||
) | ||
BeforeEach(func() { | ||
c = &Config{} | ||
toolName = "test_tool" | ||
instanceID = "test_instance" | ||
}) | ||
Context("renderInstanceIDtoOptions method", func() { | ||
When("tool option is null", func() { | ||
BeforeEach(func() { | ||
c.Tools = Tools{ | ||
{Name: toolName, InstanceID: instanceID}, | ||
} | ||
}) | ||
It("should set nil to RawOptions", func() { | ||
c.renderInstanceIDtoOptions() | ||
Expect(len(c.Tools)).Should(Equal(1)) | ||
tool := c.Tools[0] | ||
Expect(tool.Options).Should(Equal(RawOptions{ | ||
"instanceID": instanceID, | ||
})) | ||
}) | ||
}) | ||
}) | ||
Context("validate method", func() { | ||
When("config state is null", func() { | ||
BeforeEach(func() { | ||
c.Config.State = nil | ||
}) | ||
It("should return err", func() { | ||
err := c.validate() | ||
Expect(err).Should(HaveOccurred()) | ||
Expect(err.Error()).Should(Equal("config.state is not defined")) | ||
}) | ||
}) | ||
}) | ||
}) |
Oops, something went wrong.