mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 21:39:40 +02:00
refactor(helm): helm binary to sdk refactor [r8s-229] (#463)
Co-authored-by: stevensbkang <skan070@gmail.com>
This commit is contained in:
parent
0d25f3f430
commit
b5961d79f8
56 changed files with 2222 additions and 819 deletions
29
pkg/libhelm/sdk/manager_test.go
Normal file
29
pkg/libhelm/sdk/manager_test.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package sdk
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/portainer/portainer/pkg/libhelm/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_NewHelmSDKPackageManager(t *testing.T) {
|
||||
is := assert.New(t)
|
||||
|
||||
// Test that NewHelmSDKPackageManager returns a non-nil HelmPackageManager
|
||||
manager := NewHelmSDKPackageManager()
|
||||
is.NotNil(manager, "should return non-nil HelmPackageManager")
|
||||
|
||||
// Test that the returned manager is of the correct type
|
||||
_, ok := manager.(*HelmSDKPackageManager)
|
||||
is.True(ok, "should return a *HelmSDKPackageManager")
|
||||
|
||||
// Test that the manager has the expected fields
|
||||
sdkManager := manager.(*HelmSDKPackageManager)
|
||||
is.NotNil(sdkManager.settings, "should have non-nil settings")
|
||||
is.Equal(300*time.Second, sdkManager.timeout, "should have 5 minute timeout")
|
||||
|
||||
// Test that the manager implements the HelmPackageManager interface
|
||||
var _ types.HelmPackageManager = manager
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue