Skip to content

Instantly share code, notes, and snippets.

@gabriel-samfira
Last active June 3, 2022 12:24
Show Gist options
  • Save gabriel-samfira/c1d060fc07156cfa1e00e7cef8e7fb1c to your computer and use it in GitHub Desktop.
Save gabriel-samfira/c1d060fc07156cfa1e00e7cef8e7fb1c to your computer and use it in GitHub Desktop.
Prepare a Windows server machine for containerd tests

Intro

The scripts in this gist are mostly taken from the containerd repo with some small changes. Feel free to inspect them and see what they do.

Install required features

# If the feature is not already installed, this will install it
# and reboot your machine.
Install-WindowsFeature -Name Containers -Restart

Prepare env

Simply run the following:

wget -UseBasicParsing -OutFile "$HOME/setup_env.ps1" https://gist.githubusercontent.com/gabriel-samfira/7b3b519a6a55303329f9278933f7e014/raw/aa6a42d86625558532bdce93133a517e4d940712/setup_env.ps1

& "$HOME/setup_env.ps1"

After the script finishes, you may need to open a new terminal for $env:PATH to be properly applied.

Run the tests

cd C:\containerd
# Run cri-integration tests
sh.exe -c "export TEST_IMAGE_LIST=c:/containerd/repolist.toml; make cri-integration"

# run integration tests
sh.exe -c "make integration"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment