-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
genpolicy: toggle containerd pull in tests
Add v1 image test case Fixes: #9144 Signed-off-by: Saul Paredes <saulparedes@microsoft.com>
- Loading branch information
Showing
4 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bats | ||
# | ||
# Copyright (c) 2023 Microsoft. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
load "${BATS_TEST_DIRNAME}/../../common.bash" | ||
load "${BATS_TEST_DIRNAME}/tests_common.sh" | ||
|
||
setup() { | ||
get_pod_config_dir | ||
pod_name="nginxhttps" | ||
pod_yaml="${pod_config_dir}/pod-v1.yaml" | ||
policy_settings_dir="$(create_tmp_policy_settings_dir "${pod_config_dir}")" | ||
auto_generate_policy "${policy_settings_dir}" "${pod_yaml}" | ||
} | ||
|
||
@test "Deploy v1 pod" { | ||
|
||
kubectl create -f "${pod_yaml}" | ||
|
||
# Wait for pod to start | ||
kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name" | ||
} | ||
|
||
teardown() { | ||
# Debugging information | ||
kubectl describe "pod/$pod_name" | ||
|
||
kubectl delete pod "$pod_name" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/integration/kubernetes/runtimeclass_workloads/pod-v1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: nginxhttps | ||
|
||
spec: | ||
runtimeClassName: kata | ||
containers: | ||
- name: nginxhttps | ||
image: "docker.io/bprashanth/nginxhttps:1.0" | ||
ports: | ||
- containerPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters