diff --git a/api/v1beta1/azuremanagedcontrolplane_webhook_test.go b/api/v1beta1/azuremanagedcontrolplane_webhook_test.go index 6b48a2070b5..b11facbf49b 100644 --- a/api/v1beta1/azuremanagedcontrolplane_webhook_test.go +++ b/api/v1beta1/azuremanagedcontrolplane_webhook_test.go @@ -1073,7 +1073,7 @@ func TestAzureManagedControlPlane_ValidateCreate(t *testing.T) { name: "invalid DNSServiceIP", amcp: createAzureManagedControlPlane("192.168.0.10.3", "v1.18.0", generateSSHPublicKey(true)), wantErr: true, - errorLen: 1, + errorLen: 2, }, { name: "invalid DNSServiceIP", @@ -1091,7 +1091,7 @@ func TestAzureManagedControlPlane_ValidateCreate(t *testing.T) { name: "invalid sshKey with a simple text and invalid DNSServiceIP", amcp: createAzureManagedControlPlane("192.168.0.10.3", "v1.18.0", "invalid_sshkey_honk"), wantErr: true, - errorLen: 2, + errorLen: 3, }, { name: "invalid version", diff --git a/test/e2e/azure_test.go b/test/e2e/azure_test.go index 4de70a386c6..c404eaab8a9 100644 --- a/test/e2e/azure_test.go +++ b/test/e2e/azure_test.go @@ -843,16 +843,21 @@ var _ = Describe("Workload cluster creation", func() { }) Context("Creating an AKS cluster using ClusterClass [Managed Kubernetes]", func() { - // use ci-default as the clusterclass name so test infra can find the clusterclass template - os.Setenv("CLUSTER_CLASS_NAME", "ci-default") + It("with a single control plane node, one linux worker node, and one windows worker node", func() { + // use ci-default as the clusterclass name so test infra can find the clusterclass template + os.Setenv("CLUSTER_CLASS_NAME", "ci-default") - It("with a single control plane node and 1 node", func() { - clusterName = getClusterName(clusterNamePrefix, aksClusterNameSuffix) + // use "cc" as spec name because natgw pip name exceeds limit. + clusterName = getClusterName(clusterNamePrefix, "cc") kubernetesVersionUpgradeFrom, err := GetAKSKubernetesVersion(ctx, e2eConfig, AKSKubernetesVersionUpgradeFrom) Expect(err).To(BeNil()) kubernetesVersion, err := GetAKSKubernetesVersion(ctx, e2eConfig, AKSKubernetesVersion) Expect(err).To(BeNil()) + // Opt into using windows with prow template + Expect(os.Setenv("WINDOWS_WORKER_MACHINE_COUNT", "1")).To(Succeed()) + + // Create a cluster using the cluster class created above clusterctl.ApplyClusterTemplateAndWait(ctx, createApplyClusterTemplateInput( specName, withFlavor("aks-clusterclass"), @@ -861,11 +866,17 @@ var _ = Describe("Workload cluster creation", func() { withKubernetesVersion(kubernetesVersionUpgradeFrom), withControlPlaneMachineCount(1), withWorkerMachineCount(1), - withMachineDeploymentInterval(specName, ""), - withMachinePoolInterval(specName, "wait-worker-nodes"), withControlPlaneWaiters(clusterctl.ControlPlaneWaiters{ - WaitForControlPlaneInitialized: WaitForAKSControlPlaneInitialized, - WaitForControlPlaneMachinesReady: WaitForAKSControlPlaneReady, + WaitForControlPlaneInitialized: EnsureControlPlaneInitialized, + }), + withPostMachinesProvisioned(func() { + EnsureDaemonsets(ctx, func() DaemonsetsSpecInput { + return DaemonsetsSpecInput{ + BootstrapClusterProxy: bootstrapClusterProxy, + Namespace: namespace, + ClusterName: clusterName, + } + }) }), ), result)