@@ -1846,6 +1846,61 @@ func Test_Ubuntu2404Gen2(t *testing.T) {
18461846 })
18471847}
18481848
1849+ func Test_Ubuntu2404Gen2_McrChinaCloud_Scriptless (t * testing.T ) {
1850+ RunScenario (t , & Scenario {
1851+ Tags : Tags {
1852+ MockAzureChinaCloud : true ,
1853+ Scriptless : true ,
1854+ },
1855+ Description : "Tests that a node using the Ubuntu 2404 VHD can be properly bootstrapped with containerd v2" ,
1856+ Config : Config {
1857+ Cluster : ClusterKubenet ,
1858+ VHD : config .VHDUbuntu2404Gen2Containerd ,
1859+ AKSNodeConfigMutator : func (config * aksnodeconfigv1.Configuration ) {
1860+ },
1861+ VMConfigMutator : func (vmss * armcompute.VirtualMachineScaleSet ) {
1862+ if vmss .Tags == nil {
1863+ vmss .Tags = map [string ]* string {}
1864+ }
1865+ vmss .Tags ["E2EMockAzureChinaCloud" ] = to .Ptr ("true" )
1866+ },
1867+ Validator : func (ctx context.Context , s * Scenario ) {
1868+ ValidateDirectoryContent (ctx , s , "/etc/containerd/certs.d/mcr.azk8s.cn" , []string {"hosts.toml" })
1869+ },
1870+ },
1871+ })
1872+ }
1873+
1874+ func Test_Ubuntu2404Gen2_McrChinaCloud (t * testing.T ) {
1875+ RunScenario (t , & Scenario {
1876+ Tags : Tags {
1877+ MockAzureChinaCloud : true ,
1878+ },
1879+ Description : "Tests that a node using the Ubuntu 2404 VHD can be properly bootstrapped with containerd v2" ,
1880+ Config : Config {
1881+ Cluster : ClusterKubenet ,
1882+ VHD : config .VHDUbuntu2404Gen2Containerd ,
1883+ BootstrapConfigMutator : func (nbc * datamodel.NodeBootstrappingConfiguration ) {
1884+ },
1885+ VMConfigMutator : func (vmss * armcompute.VirtualMachineScaleSet ) {
1886+ if vmss .Tags == nil {
1887+ vmss .Tags = map [string ]* string {}
1888+ }
1889+ vmss .Tags ["E2EMockAzureChinaCloud" ] = to .Ptr ("true" )
1890+ },
1891+ Validator : func (ctx context.Context , s * Scenario ) {
1892+ containerdVersions := components .GetExpectedPackageVersions ("containerd" , "ubuntu" , "r2404" )
1893+ runcVersions := components .GetExpectedPackageVersions ("runc" , "ubuntu" , "r2404" )
1894+ ValidateContainerd2Properties (ctx , s , containerdVersions )
1895+ ValidateRuncVersion (ctx , s , runcVersions )
1896+ ValidateContainerRuntimePlugins (ctx , s )
1897+ ValidateSSHServiceEnabled (ctx , s )
1898+ ValidateDirectoryContent (ctx , s , "/etc/containerd/certs.d/mcr.azk8s.cn" , []string {"hosts.toml" })
1899+ },
1900+ },
1901+ })
1902+ }
1903+
18491904func Test_Ubuntu2204_SecureTLSBootstrapping_BootstrapToken_Fallback (t * testing.T ) {
18501905 RunScenario (t , & Scenario {
18511906 Description : "Tests that a node using an Ubuntu 2204 Gen2 VHD can be properly bootstrapped even if secure TLS bootstrapping fails" ,
0 commit comments