File tree Expand file tree Collapse file tree
spec/parts/linux/cloud-init/artifacts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,26 +17,34 @@ Describe 'init-aks-custom-cloud.sh refresh mode wiring'
1717 It ' always derives cert endpoint mode from refresh_location'
1818 When run grep -Eq ' ^location_normalized="\$\{refresh_location,,\}"$' " $script_path "
1919 The status should eq 0
20+ End
2021
22+ It ' maps ussec/usnat locations to legacy cert endpoint mode'
2123 When run grep -Eq ' ussec\*|usnat\*\) cert_endpoint_mode="legacy"' " $script_path "
2224 The status should eq 0
2325 End
2426
25- It ' installs refresh schedule only for legacy mode or opted-in rcv1p mode '
27+ It ' initializes refresh schedule installation as disabled '
2628 When run grep -Eq ' ^install_ca_refresh_schedule=0$' " $script_path "
2729 The status should eq 0
30+ End
2831
32+ It ' enables refresh schedule installation for eligible certificate modes'
2933 When run grep -Eq ' ^[[:space:]]*install_ca_refresh_schedule=1$' " $script_path "
3034 The status should eq 0
35+ End
3136
37+ It ' gates refresh schedule installation on install_ca_refresh_schedule'
3238 When run grep -Eq ' ^[[:space:]]*if \[ "\$install_ca_refresh_schedule" -eq 1 \]; then$' " $script_path "
3339 The status should eq 0
3440 End
3541
36- It ' exits early in ca-refresh mode after certificate refresh logic'
42+ It ' checks for ca-refresh mode after certificate refresh logic'
3743 When run grep -Eq ' ^if \[ "\$action" = "ca-refresh" \]; then$' " $script_path "
3844 The status should eq 0
45+ End
3946
47+ It ' exits early in ca-refresh mode after certificate refresh logic'
4048 When run grep -Eq ' ^[[:space:]]*exit$' " $script_path "
4149 The status should eq 0
4250 End
Original file line number Diff line number Diff line change @@ -48,8 +48,11 @@ function Register-ScheduledTask {
4848 param ($TaskName , $InputObject )
4949}
5050
51- . $PSScriptRoot \..\..\..\parts\windows\windowscsehelper.ps1
52- . $PSCommandPath.Replace (' .tests.ps1' , ' .ps1' )
51+ $helperScriptPath = Join-Path $PSScriptRoot ' ..\..\..\parts\windows\windowscsehelper.ps1'
52+ $scriptUnderTestPath = Join-Path $PSScriptRoot ' kubernetesfunc.ps1'
53+
54+ . $helperScriptPath
55+ . $scriptUnderTestPath
5356
5457Describe ' Get-CustomCloudCertEndpointModeFromLocation' {
5558 It ' returns legacy for ussec regions' {
You can’t perform that action at this time.
0 commit comments