@@ -66,6 +66,7 @@ var _ = Describe("Dataplane NodeSet Test", func() {
6666 var dataplaneConfigHash string
6767 var dataplaneGlobalServiceName types.NamespacedName
6868 var dataplaneUpdateServiceName types.NamespacedName
69+ var newDataplaneUpdateServiceName types.NamespacedName
6970
7071 defaultEdpmServiceList := []string {
7172 "edpm_frr_image" ,
@@ -118,6 +119,10 @@ var _ = Describe("Dataplane NodeSet Test", func() {
118119 Name : "update" ,
119120 Namespace : namespace ,
120121 }
122+ newDataplaneUpdateServiceName = types.NamespacedName {
123+ Name : "update-services" ,
124+ Namespace : namespace ,
125+ }
121126 err := os .Setenv ("OPERATOR_SERVICES" , "../../../config/services" )
122127 Expect (err ).NotTo (HaveOccurred ())
123128 })
@@ -1306,6 +1311,54 @@ var _ = Describe("Dataplane NodeSet Test", func() {
13061311 })
13071312 })
13081313
1314+ When ("A DataPlaneNodeSet is created with NoNodes and a MinorUpdateServices OpenStackDataPlaneDeployment is created" , func () {
1315+ BeforeEach (func () {
1316+
1317+ dataplanev1 .SetupDefaults ()
1318+ updateServiceSpec := map [string ]interface {}{
1319+ "playbook" : "osp.edpm.update_services" ,
1320+ }
1321+ CreateDataPlaneServiceFromSpec (newDataplaneUpdateServiceName , updateServiceSpec )
1322+ DeferCleanup (th .DeleteService , newDataplaneUpdateServiceName )
1323+ DeferCleanup (th .DeleteInstance , CreateNetConfig (dataplaneNetConfigName , DefaultNetConfigSpec ()))
1324+ DeferCleanup (th .DeleteInstance , CreateDNSMasq (dnsMasqName , DefaultDNSMasqSpec ()))
1325+ DeferCleanup (th .DeleteInstance , CreateDataplaneNodeSet (dataplaneNodeSetName , DefaultDataPlaneNoNodeSetSpec (false )))
1326+ DeferCleanup (th .DeleteInstance , CreateDataplaneDeployment (dataplaneDeploymentName , MinorUpdateServicesDataPlaneDeploymentSpec ()))
1327+ openstackVersionName := types.NamespacedName {
1328+ Name : "openstackversion" ,
1329+ Namespace : namespace ,
1330+ }
1331+ err := os .Setenv ("OPENSTACK_RELEASE_VERSION" , "0.0.1" )
1332+ Expect (err ).NotTo (HaveOccurred ())
1333+ openstackv1 .SetupVersionDefaults ()
1334+ DeferCleanup (th .DeleteInstance , CreateOpenStackVersion (openstackVersionName ))
1335+
1336+ CreateSSHSecret (dataplaneSSHSecretName )
1337+ CreateCABundleSecret (caBundleSecretName )
1338+ SimulateDNSMasqComplete (dnsMasqName )
1339+ SimulateIPSetComplete (dataplaneNodeName )
1340+ SimulateDNSDataComplete (dataplaneNodeSetName )
1341+
1342+ Eventually (func (g Gomega ) {
1343+ // Make an AnsibleEE name for each service
1344+ ansibleeeName := types.NamespacedName {
1345+ Name : "update-services-edpm-deployment-edpm-compute-nodeset" ,
1346+ Namespace : namespace ,
1347+ }
1348+ ansibleEE := GetAnsibleee (ansibleeeName )
1349+ ansibleEE .Status .Succeeded = 1
1350+ g .Expect (th .K8sClient .Status ().Update (th .Ctx , ansibleEE )).To (Succeed ())
1351+ }, th .Timeout , th .Interval ).Should (Succeed ())
1352+
1353+ })
1354+ It ("NodeSet.Status.DeployedVersion should be set to latest version" , Label ("update" ), func () {
1355+ Eventually (func () string {
1356+ dataplaneNodeSetInstance := GetDataplaneNodeSet (dataplaneNodeSetName )
1357+ return dataplaneNodeSetInstance .Status .DeployedVersion
1358+ }).Should (Equal ("0.0.1" ))
1359+ })
1360+ })
1361+
13091362 When ("A NodeSet and Deployment are created" , func () {
13101363 BeforeEach (func () {
13111364 nodeSetSpec := DefaultDataPlaneNodeSetSpec ("edpm-compute" )
0 commit comments