mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
fix cloud-node-manager stub
This commit is contained in:
parent
f04765dab5
commit
efdd88459b
@ -40,7 +40,6 @@ func TestInitCluster(t *testing.T) {
|
|||||||
SupportsCloudControllerManager: false,
|
SupportsCloudControllerManager: false,
|
||||||
SupportClusterAutoscaler: false,
|
SupportClusterAutoscaler: false,
|
||||||
AutoscalingNodeGroups: []string{"someNodeGroup"},
|
AutoscalingNodeGroups: []string{"someNodeGroup"},
|
||||||
CloudControllerManagerEnv: []k8s.EnvVar{},
|
|
||||||
},
|
},
|
||||||
expectErr: false,
|
expectErr: false,
|
||||||
},
|
},
|
||||||
@ -62,7 +61,6 @@ func TestInitCluster(t *testing.T) {
|
|||||||
ProviderID: "fake://providerid",
|
ProviderID: "fake://providerid",
|
||||||
SupportsCloudControllerManager: false,
|
SupportsCloudControllerManager: false,
|
||||||
SupportClusterAutoscaler: false,
|
SupportClusterAutoscaler: false,
|
||||||
CloudControllerManagerEnv: []k8s.EnvVar{},
|
|
||||||
},
|
},
|
||||||
expectErr: false,
|
expectErr: false,
|
||||||
},
|
},
|
||||||
@ -93,7 +91,6 @@ func TestInitCluster(t *testing.T) {
|
|||||||
SupportClusterAutoscaler: true,
|
SupportClusterAutoscaler: true,
|
||||||
AutoscalingCloudprovider: "some-name",
|
AutoscalingCloudprovider: "some-name",
|
||||||
AutoscalingNodeGroups: []string{"someNodeGroup"},
|
AutoscalingNodeGroups: []string{"someNodeGroup"},
|
||||||
CloudControllerManagerEnv: []k8s.EnvVar{},
|
|
||||||
},
|
},
|
||||||
expectErr: false,
|
expectErr: false,
|
||||||
},
|
},
|
||||||
@ -116,7 +113,6 @@ func TestInitCluster(t *testing.T) {
|
|||||||
CloudControllerManagerName: "some-name",
|
CloudControllerManagerName: "some-name",
|
||||||
CloudControllerManagerImage: "someImage",
|
CloudControllerManagerImage: "someImage",
|
||||||
CloudControllerManagerPath: "/some/path",
|
CloudControllerManagerPath: "/some/path",
|
||||||
CloudControllerManagerEnv: []k8s.EnvVar{},
|
|
||||||
},
|
},
|
||||||
expectErr: false,
|
expectErr: false,
|
||||||
},
|
},
|
||||||
@ -146,9 +142,8 @@ func TestInitCluster(t *testing.T) {
|
|||||||
},
|
},
|
||||||
expectErr: false,
|
expectErr: false,
|
||||||
expectedInitClusterInput: kubernetes.InitClusterInput{
|
expectedInitClusterInput: kubernetes.InitClusterInput{
|
||||||
APIServerAdvertiseIP: "10.118.0.1",
|
APIServerAdvertiseIP: "10.118.0.1",
|
||||||
NodeIP: "10.118.0.1",
|
NodeIP: "10.118.0.1",
|
||||||
CloudControllerManagerEnv: []k8s.EnvVar{},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"getting kubeconfig fail detected": {
|
"getting kubeconfig fail detected": {
|
||||||
@ -389,6 +384,7 @@ type stubCloudControllerManager struct {
|
|||||||
secretsErr error
|
secretsErr error
|
||||||
volumesRes []k8s.Volume
|
volumesRes []k8s.Volume
|
||||||
volumeMountRes []k8s.VolumeMount
|
volumeMountRes []k8s.VolumeMount
|
||||||
|
envRes []k8s.EnvVar
|
||||||
supportedRes bool
|
supportedRes bool
|
||||||
|
|
||||||
prepareInstanceRequests []prepareInstanceRequest
|
prepareInstanceRequests []prepareInstanceRequest
|
||||||
@ -435,7 +431,7 @@ func (s *stubCloudControllerManager) VolumeMounts() []k8s.VolumeMount {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *stubCloudControllerManager) Env() []k8s.EnvVar {
|
func (s *stubCloudControllerManager) Env() []k8s.EnvVar {
|
||||||
return []k8s.EnvVar{}
|
return s.envRes
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *stubCloudControllerManager) Supported() bool {
|
func (s *stubCloudControllerManager) Supported() bool {
|
||||||
@ -443,20 +439,10 @@ func (s *stubCloudControllerManager) Supported() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type stubCloudNodeManager struct {
|
type stubCloudNodeManager struct {
|
||||||
imageRes string
|
imageRes string
|
||||||
pathRes string
|
pathRes string
|
||||||
nameRes string
|
extraArgsRes []string
|
||||||
prepareInstanceRes error
|
supportedRes bool
|
||||||
extraArgsRes []string
|
|
||||||
configMapsRes resources.ConfigMaps
|
|
||||||
configMapsErr error
|
|
||||||
secretsRes resources.Secrets
|
|
||||||
secretsErr error
|
|
||||||
volumesRes []k8s.Volume
|
|
||||||
volumeMountRes []k8s.VolumeMount
|
|
||||||
supportedRes bool
|
|
||||||
|
|
||||||
prepareInstanceRequests []prepareInstanceRequest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *stubCloudNodeManager) Image() string {
|
func (s *stubCloudNodeManager) Image() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user