Skip to content

Commit

Permalink
Add functional cinder_controller_test code
Browse files Browse the repository at this point in the history
The code is based on manila's, with updates relavant to cinder.
  • Loading branch information
ASBishop committed Nov 6, 2023
1 parent 6c4f36e commit 5357266
Show file tree
Hide file tree
Showing 5 changed files with 480 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require (
k8s.io/api v0.26.9
k8s.io/apimachinery v0.26.9
k8s.io/client-go v0.26.9
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
sigs.k8s.io/controller-runtime v0.14.6
)

Expand Down Expand Up @@ -78,7 +79,6 @@ require (
k8s.io/component-base v0.26.9 //indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230327201221-f5883ff37f0c //indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
30 changes: 18 additions & 12 deletions test/functional/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,34 @@ func GetDefaultCinderSpec() map[string]interface{} {

func GetDefaultCinderAPISpec() map[string]interface{} {
return map[string]interface{}{
"secret": SecretName,
"replicas": 1,
"containerImage": cinderTest.ContainerImage,
"serviceAccount": cinderTest.CinderSA.Name,
"secret": SecretName,
"replicas": 1,
"containerImage": cinderTest.ContainerImage,
"serviceAccount": cinderTest.CinderSA.Name,
"databaseHostname": cinderTest.DatabaseHostname,
"transportURLSecret": cinderTest.RabbitmqSecretName,
}
}

func GetDefaultCinderSchedulerSpec() map[string]interface{} {
return map[string]interface{}{
"secret": SecretName,
"replicas": 1,
"containerImage": cinderTest.ContainerImage,
"serviceAccount": cinderTest.CinderSA.Name,
"secret": SecretName,
"replicas": 1,
"containerImage": cinderTest.ContainerImage,
"serviceAccount": cinderTest.CinderSA.Name,
"databaseHostname": cinderTest.DatabaseHostname,
"transportURLSecret": cinderTest.RabbitmqSecretName,
}
}

func GetDefaultCinderVolumeSpec() map[string]interface{} {
return map[string]interface{}{
"secret": SecretName,
"replicas": 1,
"containerImage": cinderTest.ContainerImage,
"serviceAccount": cinderTest.CinderSA.Name,
"secret": SecretName,
"replicas": 1,
"containerImage": cinderTest.ContainerImage,
"serviceAccount": cinderTest.CinderSA.Name,
"databaseHostname": cinderTest.DatabaseHostname,
"transportURLSecret": cinderTest.RabbitmqSecretName,
}
}

Expand Down
Loading

0 comments on commit 5357266

Please sign in to comment.