Skip to content

Commit

Permalink
tess fro helmreleasesettings
Browse files Browse the repository at this point in the history
  • Loading branch information
EronWright committed May 1, 2024
1 parent 4f0d3b0 commit 2186e1d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions provider/pkg/provider/provider_configure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,34 @@ var _ = Describe("RPC:Configure", func() {
})
})

Describe("Helm Release Settings", func() {
Context("given helmReleaseSettings", func() {
var helmReleaseSettings *HelmReleaseSettings
BeforeEach(func() {
helmReleaseSettings = &HelmReleaseSettings{
Driver: ptr.To("configmap"),
PluginsPath: ptr.To("plugins"),
RegistryConfigPath: ptr.To("registry"),
RepositoryCache: ptr.To("cache"),
RepositoryConfigPath: ptr.To("config"),
}
})
JustBeforeEach(func() {
data, _ := json.Marshal(helmReleaseSettings)
req.Variables["kubernetes:config:helmReleaseSettings"] = string(data)
})
It("should use the configured settings", func() {
_, err := k.Configure(context.Background(), req)
Expect(err).ShouldNot(HaveOccurred())
Expect(k.helmDriver).To(Equal("configmap"))
Expect(k.helmSettings.PluginsDirectory).To(Equal("plugins"))
Expect(k.helmSettings.RegistryConfig).To(Equal("registry"))
Expect(k.helmSettings.RepositoryCache).To(Equal("cache"))
Expect(k.helmSettings.RepositoryConfig).To(Equal("config"))
})
})
})

Describe("Discovery", func() {
It("should record the server version for use in subsequent RPC methods", func() {
_, err := k.Configure(context.Background(), req)
Expand Down

0 comments on commit 2186e1d

Please sign in to comment.