Skip to content

Commit 0c22c90

Browse files
committed
syncing chef-TKW with the upstream test-kitchen
Signed-off-by: nikhil2611 <[email protected]>
2 parents 620c067 + 6dda7f1 commit 0c22c90

File tree

191 files changed

+1328
-713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+1328
-713
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Managing line ending conversions
2-
# See http://git-scm.com/docs/gitattributes#_end-of-line_conversion
2+
# See https://git-scm.com/docs/gitattributes#_end-of-line_conversion
33
* text=auto eol=lf

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
on:
2+
"on":
33
pull_request:
44
push:
55
branches:

.github/workflows/integration.yml

Lines changed: 111 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
2+
<<<<<<< HEAD
23
on:
4+
=======
5+
"on":
6+
>>>>>>> upstream/main
37
workflow_call:
48

59
permissions:
@@ -10,7 +14,11 @@ concurrency:
1014
cancel-in-progress: true
1115

1216
env:
17+
<<<<<<< HEAD
1318
CHEF_TEST_KITCHEN_ENTERPRISE: true
19+
=======
20+
BUNDLE_WITHOUT: integration
21+
>>>>>>> upstream/main
1422
machine_user: test_user
1523
machine_pass: Pass@word1
1624
SPEC_OPTS: --format progress
@@ -42,32 +50,63 @@ jobs:
4250
strategy:
4351
fail-fast: false
4452
matrix:
53+
<<<<<<< HEAD
4554
ruby: ["3.1", "3.4"]
55+
=======
56+
ruby: ["3.4"]
57+
>>>>>>> upstream/main
4658
steps:
4759
- name: Install VirtualBox
4860
run: |
4961
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
5062
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
5163
sudo apt-get update
64+
<<<<<<< HEAD
5265
sudo apt-get install -y software-properties-common libarchive-tools vagrant virtualbox
66+
=======
67+
sudo apt-get install -y libarchive-tools virtualbox
68+
>>>>>>> upstream/main
5369
- uses: actions/checkout@v5
5470
- uses: ruby/setup-ruby@v1
5571
with:
5672
ruby-version: ${{ matrix.ruby }}
5773
bundler-cache: true
74+
<<<<<<< HEAD
5875
- name: Verify Vagrant
5976
run: |
77+
=======
78+
- name: Setup Machine
79+
run: |
80+
bundle config set --local with 'integration'
81+
bundle add vagrant --version ">= 2.4.4"
82+
bundle install
83+
bundle binstubs vagrant
84+
export PATH="$(pwd)/bin:$PATH"
85+
which vagrant
86+
vagrant -v
87+
- name: Verify Vagrant
88+
run: |
89+
export PATH="$(pwd)/bin:$PATH"
90+
>>>>>>> upstream/main
6091
bundle exec kitchen verify almalinux-9
6192

6293
macos:
6394
env:
6495
machine_port: 22
96+
<<<<<<< HEAD
6597
KITCHEN_LOCAL_YAML: kitchen.proxy.yml
98+
=======
99+
KITCHEN_LOCAL_YAML: kitchen.${{ matrix.kitchen_yaml }}.yml
100+
>>>>>>> upstream/main
66101
runs-on: macos-latest
67102
strategy:
68103
fail-fast: false
69104
matrix:
70105
ruby: ["3.1", "3.4"]
106+
<<<<<<< HEAD
107+
=======
108+
kitchen_yaml: ["dummy", "exec", "proxy", "shell"]
109+
>>>>>>> upstream/main
71110
steps:
72111
- uses: actions/checkout@v5
73112
- uses: ruby/setup-ruby@v1
@@ -85,21 +124,29 @@ jobs:
85124
sudo dscl . -passwd /Users/${{ env.machine_user }} ${{ env.machine_pass }}
86125
sudo createhomedir -c -u ${{ env.machine_user }}
87126
echo "${{ env.machine_user }} ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
127+
<<<<<<< HEAD
88128
bundle config set --local with 'integration'
89129
bundle install
130+
=======
131+
>>>>>>> upstream/main
90132
- name: Verify macOS
91133
run: bundle exec kitchen verify localhost
92134

93135
windows:
94136
env:
95137
machine_port: 5985
138+
<<<<<<< HEAD
96139
KITCHEN_LOCAL_YAML: kitchen.proxy.yml
140+
=======
141+
KITCHEN_LOCAL_YAML: kitchen.${{ matrix.kitchen_yaml }}.yml
142+
>>>>>>> upstream/main
97143
runs-on: windows-latest
98144
timeout-minutes: 600
99145
strategy:
100146
fail-fast: false
101147
matrix:
102148
ruby: ["3.1", "3.4"]
149+
kitchen_yaml: ["dummy", "exec", "proxy", "shell"]
103150
steps:
104151
- uses: actions/checkout@v5
105152
- uses: ruby/setup-ruby@v1
@@ -111,21 +158,20 @@ jobs:
111158
winrm.cmd quickconfig -q
112159
net user /add ${{ env.machine_user }} ${{ env.machine_pass }}
113160
net localgroup administrators ${{ env.machine_user }} /add
114-
bundle config set --local with 'integration'
115-
bundle install
116161
- name: Verify Windows
117-
run: bundle exec kitchen verify windows
162+
run: bundle exec kitchen verify windows-winrm
118163

119164
linux:
120165
env:
121166
machine_port: 22
122-
KITCHEN_LOCAL_YAML: kitchen.proxy.yml
167+
KITCHEN_LOCAL_YAML: kitchen.${{ matrix.kitchen_yaml }}.yml
123168
runs-on: ubuntu-latest
124169
timeout-minutes: 600
125170
strategy:
126171
fail-fast: false
127172
matrix:
128173
ruby: ["3.1", "3.4"]
174+
kitchen_yaml: ["dummy", "exec", "proxy", "shell"]
129175
steps:
130176
- uses: actions/checkout@v5
131177
- uses: ruby/setup-ruby@v1
@@ -137,7 +183,65 @@ jobs:
137183
sudo useradd -m ${{ env.machine_user }}
138184
echo "${{ env.machine_user }}:${{ env.machine_pass }}" | sudo chpasswd
139185
echo "${{ env.machine_user }} ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers
140-
bundle config set --local with 'integration'
141-
bundle install
142186
- name: Verify Linux
143-
run: bundle exec kitchen verify localhost
187+
run: |
188+
bundle exec kitchen verify localhost
189+
190+
windows-fips-ssh:
191+
env:
192+
machine_port: 22
193+
KITCHEN_LOCAL_YAML: kitchen.exec.yml
194+
runs-on: windows-latest
195+
timeout-minutes: 600
196+
strategy:
197+
fail-fast: false
198+
matrix:
199+
ruby: ["3.1", "3.4"]
200+
kitchen_yaml: ["dummy", "exec", "proxy", "shell"]
201+
steps:
202+
- uses: actions/checkout@v5
203+
- uses: ruby/setup-ruby@v1
204+
with:
205+
ruby-version: ${{ matrix.ruby }}
206+
bundler-cache: true
207+
- name: 'Enable FIPS via windows registry'
208+
run: |
209+
$OldErrorActionPreference = $ErrorActionPreference
210+
$ErrorActionPreference = "stop"
211+
$KeyPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy"
212+
$ValueName = "Enabled"
213+
$ValueData = "1"
214+
try{
215+
Get-ItemProperty -Path $KeyPath -Name $valueName -ErrorAction Stop
216+
New-ItemProperty -Path $KeyPath -Name $ValueName -Value $ValueData -PropertyType DWord -Force
217+
}
218+
catch [System.Management.Automation.PSArgumentException] {
219+
New-ItemProperty -Path $KeyPath -Name $ValueName -Value $ValueData -PropertyType DWord -Force
220+
}
221+
catch [System.Management.Automation.ItemNotFoundException]
222+
{
223+
New-Item -Path $KeyPath -Force
224+
New-ItemProperty -Path $KeyPath -Name $ValueName -Value $ValueData -PropertyType DWord -Force
225+
}
226+
Finally
227+
{
228+
$ErrorActionPreference = $OldErrorActionPreference
229+
}
230+
if (-not $?) { throw "Failed to enable FIPS mode." }
231+
- name: Setup Machine
232+
run: |
233+
Add-WindowsCapability -Online -Name OpenSSH.Server
234+
Start-Service -Name "sshd"
235+
# Ensure the firewall rule for OpenSSH Server is enabled (it should be created automatically during installation)
236+
if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue)) {
237+
Write-Host "Firewall Rule 'OpenSSH-Server-In-TCP' does not exist, creating it..."
238+
New-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -DisplayName "OpenSSH Server (sshd)" -Enabled True -Direction Inbound -Protocol TCP -LocalPort 22 -Action Allow
239+
} else {
240+
Write-Host "Firewall Rule 'OpenSSH-Server-In-TCP' already exists."
241+
# Optionally, ensure it's enabled
242+
Set-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -Enabled True
243+
}
244+
net user /add ${{ env.machine_user }} ${{ env.machine_pass }}
245+
net localgroup administrators ${{ env.machine_user }} /add
246+
- name: Verify Windows FIPS SSH
247+
run: bundle exec kitchen verify windows-fips-ssh -l debug

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
on:
2+
"on":
33
workflow_call:
44

55
permissions:
@@ -54,7 +54,7 @@ jobs:
5454
- uses: actions/checkout@v5
5555

5656
- name: Markdown lint
57-
uses: DavidAnson/markdownlint-cli2-action@v16
57+
uses: DavidAnson/markdownlint-cli2-action@v20
5858
with:
5959
globs: |
6060
*.md
@@ -64,7 +64,7 @@ jobs:
6464
runs-on: ubuntu-latest
6565
steps:
6666
- uses: actions/checkout@v5
67-
- uses: gaurav-nelson/[email protected].15
67+
- uses: gaurav-nelson/[email protected].17
6868
with:
6969
use-quiet-mode: "yes"
7070
use-verbose-mode: "yes"

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.7.0"
2+
".": "3.9.0"
33
}

.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
require:
3-
- cookstyle
3+
- cookstyle/chefstyle
44

55
AllCops:
6-
TargetRubyVersion: 3.1
6+
TargetRubyVersion: 3.4
77
Include:
88
- "**/*.rb"

CHANGELOG.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,51 @@
2222
- Rename the chef-dke to chef workstation [#40](https://github.com/chef/chef-test-kitchen-enterprise/pull/40) ([sanghinitin](https://github.com/sanghinitin)) <!-- 1.0.17 -->
2323
- [CHEF-18897] Add the berkshelf gem and use the chef-cli from the Chef-DKE [#36](https://github.com/chef/chef-test-kitchen-enterprise/pull/36) ([ashiqueps](https://github.com/ashiqueps)) <!-- 1.0.16 -->
2424
- Fixed the issue with loading the license config [#34](https://github.com/chef/chef-test-kitchen-enterprise/pull/34) ([ashiqueps](https://github.com/ashiqueps)) <!-- 1.0.15 -->
25+
<!-- release_rollup -->
26+
27+
---
28+
29+
## Upstream Test Kitchen Changes Merged
30+
31+
The following changes have been merged from upstream Test Kitchen (https://github.com/test-kitchen/test-kitchen):
32+
33+
## [3.9.0](https://github.com/test-kitchen/test-kitchen/compare/v3.8.2...v3.9.0) (2025-09-05)
34+
35+
### Features
36+
37+
* Added custom proxy command support for AWS EC2 Instance Connect EC2 driver support ([#2019](https://github.com/test-kitchen/test-kitchen/issues/2019)) ([0529e66](https://github.com/test-kitchen/test-kitchen/commit/0529e66447e68b495ef710116420154008fa2238))
38+
39+
## [3.8.2](https://github.com/test-kitchen/test-kitchen/compare/v3.8.1...v3.8.2) (2025-09-05)
40+
41+
### Bug Fixes
42+
43+
* updates to fix tests ([#2022](https://github.com/test-kitchen/test-kitchen/issues/2022)) ([7552481](https://github.com/test-kitchen/test-kitchen/commit/7552481a5234fcf49f394ff848ce29a9a916940c))
44+
45+
## [3.8.1](https://github.com/test-kitchen/test-kitchen/compare/v3.8.0...v3.8.1) (2025-07-24)
46+
47+
### Bug Fixes
48+
49+
* Remove expired copyright ([#2017](https://github.com/test-kitchen/test-kitchen/issues/2017)) ([27ad560](https://github.com/test-kitchen/test-kitchen/commit/27ad560079ce2f21d384d207d6161c562ef3eda2))
50+
51+
## [3.8.0](https://github.com/test-kitchen/test-kitchen/compare/v3.7.2...v3.8.0) (2025-07-12)
52+
53+
### Features
54+
55+
* Support for SSH transport for windows platfoms ([#2007](https://github.com/test-kitchen/test-kitchen/issues/2007)) ([1c79066](https://github.com/test-kitchen/test-kitchen/commit/1c790661c7b81c917a4ea1eb0276296ade4b1f39))
56+
57+
## [3.7.2](https://github.com/test-kitchen/test-kitchen/compare/v3.7.1...v3.7.2) (2025-07-03)
58+
59+
### Bug Fixes
60+
61+
* Update the docs + init for modern platforms ([#2009](https://github.com/test-kitchen/test-kitchen/issues/2009)) ([2c8cca1](https://github.com/test-kitchen/test-kitchen/commit/2c8cca1f77d2b589ae0ed7a6e5cc971de7141f5c))
62+
63+
## [3.7.1](https://github.com/test-kitchen/test-kitchen/compare/v3.7.0...v3.7.1) (2024-12-02)
64+
65+
### Bug Fixes
66+
67+
* Prevent Test Kitchen from requiring Chef license acceptance when an alternative distribution (such as cinc) is used with a Policyfile. ([#1984](https://github.com/test-kitchen/test-kitchen/issues/1984)) ([332294e](https://github.com/test-kitchen/test-kitchen/commit/332294efc3ce27309afd49fa944448713b102070))
68+
69+
---
2570

2671
### Merged Pull Requests
2772

@@ -1767,4 +1812,4 @@
17671812
<!-- release_rollup -->
17681813

17691814
<!-- latest_stable_release -->
1770-
<!-- latest_stable_release -->
1815+
<!-- latest_stable_release -->

0 commit comments

Comments
 (0)