Skip to content

Commit

Permalink
Move template tests, rm src dir (#1565)
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermckinnon authored Jan 12, 2024
1 parent 8a901f6 commit 3cf8461
Show file tree
Hide file tree
Showing 102 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ lint: lint-docs ## Check the source files for syntax and format issues

.PHONY: test
test: ## run the test-harness
test/test-harness.sh
templates/test/test-harness.sh

PACKER_BINARY ?= packer
PACKER_TEMPLATE_DIR ?= src/templates/$(os_distro)
Expand Down
4 changes: 2 additions & 2 deletions hack/generate-template-variable-doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def update_doc(doc: str, boundary: str, template_path: str) -> str:
with open(doc_file_name) as doc_file:
doc = doc_file.read()

doc = update_doc(doc, al2_boundary, '../src/templates/al2/template.json')
doc = update_doc(doc, al2023_boundary, '../src/templates/al2023/template.json')
doc = update_doc(doc, al2_boundary, '../templates/al2/template.json')
doc = update_doc(doc, al2023_boundary, '../templates/al2023/template.json')

with open(doc_file_name, 'w') as doc_file:
doc_file.write(doc)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions templates/test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM public.ecr.aws/aws-ec2/amazon-ec2-metadata-mock:v1.11.2 as aemm
FROM public.ecr.aws/amazonlinux/amazonlinux:2
RUN amazon-linux-extras enable docker && \
yum install -y jq containerd wget which && \
wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && \
chmod a+x /usr/local/bin/yq

ENV IMDS_ENDPOINT=127.0.0.1:1338
COPY --from=aemm /ec2-metadata-mock /sbin/ec2-metadata-mock
RUN mkdir -p /etc/systemd/system
RUN mkdir -p /etc/eks/containerd
COPY al2/runtime/ /etc/eks/
COPY shared/runtime/ /etc/eks/
COPY al2/runtime/containerd-config.toml al2/runtime/kubelet-containerd.service al2/runtime/pull-sandbox-image.sh al2/runtime/sandbox-image.service /etc/eks/containerd/
COPY al2/runtime/kubelet-config.json /etc/kubernetes/kubelet/kubelet-config.json
COPY al2/runtime/kubelet-kubeconfig /var/lib/kubelet/kubeconfig
COPY al2/runtime/ecr-credential-provider-config.json /etc/eks/image-credential-provider/config.json
COPY test/entrypoint.sh /entrypoint.sh
COPY al2/runtime/bin/* /usr/bin/
COPY test/mocks/ /sbin/
ENTRYPOINT ["/entrypoint.sh"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 0 additions & 21 deletions test/Dockerfile

This file was deleted.

0 comments on commit 3cf8461

Please sign in to comment.