Skip to content

Commit

Permalink
tests: update test images used for cri-containerd tests
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim An <maksiman@microsoft.com>
  • Loading branch information
anmaxvl committed Dec 21, 2023
1 parent 6901c20 commit 9b834fb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
5 changes: 3 additions & 2 deletions test/cri-containerd/test-images/argsescaped/dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Test image for ArgsEscaped behavior.
FROM mcr.microsoft.com/windows/nanoserver:1809
# cplatpublic.azurecr.io/argsescaped:latest
FROM mcr.microsoft.com/windows/nanoserver:1809@sha256:18dc202bc15c4ab948a993a021b554e70a5bc8f9f854a0674b3f5467cc7092da
ENTRYPOINT cmd.exe /c
CMD ping -t 127.0.0.1
CMD ping -t 127.0.0.1
10 changes: 5 additions & 5 deletions test/cri-containerd/test-images/imagepull_timestamp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# This Dockerfile builds a docker image based on top of the nanoserver image that is
# used during the pull image tests in hcsshim. Tests in hcsshim/test/pullimage_test.go
# used during the pull image tests in hcsshim. Tests in hcsshim/test/cri-containerd/pullimage_test.go
# are directly dependent on the directory structure of this image. If anything is changed
# in this Dockerfile, please make sure to update the tests too.

# As of now this image is built with:
# `docker build -t mtbar131/hcsshim:nanoserver_test .`
# `docker build -t cplatpublic.azurecr.io/timestamp:latest .`
# And this image is pushed to a private repo with:
# `docker push mtbar131/hcsshim:nanoserver_test`
# `docker push cplatpublic.azurecr.io/timestamp:latest`

# Base image
FROM mcr.microsoft.com/windows/nanoserver:1909
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022@sha256:56a7c823d8aed810849a38f47d995a727bf3de1ec611394025e1de24898a9622
# Get administrator privileges
USER containeradministrator

Expand All @@ -20,4 +20,4 @@ RUN mklink /d C:\Users\Public\fakelink C:\abcd
# layer. The tests verify that even after file deletion in a layer timestamps are updated
# correcty.
RUN mkdir C:\Users\Public\testdir && echo "Windows Layer timestamp test" > C:\Users\Public\testdir\test.txt
RUN del /q C:\Users\Public\testdir\test.txt
RUN del /q C:\Users\Public\testdir\test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Test image for graceful termination CRI integration tests.
# `docker build -t cplatpublic.azurecr.io/nanoserver-gracefultermination-repro:latest .`
# `docker push cplatpublic.azurecr.io/nanoserver-gracefultermination-repro:latest`

FROM golang:latest as build
ENV GOOS=windows
ENV GOARCH=amd64
Expand All @@ -6,7 +10,7 @@ WORKDIR /app
COPY ./delayed-shutdown.go ./
RUN go build -o delayed-shutdown.exe

FROM mcr.microsoft.com/windows/nanoserver:ltsc2022
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022@sha256:56a7c823d8aed810849a38f47d995a727bf3de1ec611394025e1de24898a9622
WORKDIR /app
COPY --from=build /app/delayed-shutdown.exe .
ENTRYPOINT ["delayed-shutdown.exe"]
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Test image for graceful termination CRI integration tests.
# `docker build -t cplatpublic.azurecr.io/servercore-gracefultermination-repro:latest .`
# `docker push cplatpublic.azurecr.io/servercore-gracefultermination-repro:latest`

FROM golang:latest as build
ENV GOOS=windows
ENV GOARCH=amd64
Expand All @@ -6,7 +10,7 @@ WORKDIR /app
COPY ./delayed-shutdown.go ./
RUN go build -o delayed-shutdown.exe

FROM mcr.microsoft.com/windows/servercore:ltsc2022
FROM mcr.microsoft.com/windows/servercore:ltsc2022@sha256:029d8eb737c978e3df0f26abb529efd38d3c9ecee9d8d0bba6d0c205f32dc263
WORKDIR /app
COPY --from=build /app/delayed-shutdown.exe .
ENTRYPOINT ["delayed-shutdown.exe"]

0 comments on commit 9b834fb

Please sign in to comment.