Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
k8s: enable memroy tests
Browse files Browse the repository at this point in the history
Increase the memory size to allow testing.

aarch64 memory hotplug seems not working. Skip it for now.

Depends-on: github.com/kata-containers/kata-containers#910
Fixes: #2942
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
  • Loading branch information
bergwolf committed Oct 12, 2020
1 parent 0cd828b commit 129fc54
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions .ci/aarch64/configuration_aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ kubernetes:
- k8s-expose-ip
- k8s-oom
- k8s-block-volume
- k8s-memory
11 changes: 1 addition & 10 deletions integration/kubernetes/k8s-memory.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,14 @@

load "${BATS_TEST_DIRNAME}/../../.ci/lib.sh"
load "${BATS_TEST_DIRNAME}/../../lib/common.bash"
TEST_INITRD="${TEST_INITRD:-no}"
issue="https://github.com/kata-containers/runtime/issues/1127"
memory_issue="https://github.com/kata-containers/runtime/issues/1249"

setup() {
skip "test not working see: ${issue}, ${memory_issue}"

export KUBECONFIG="$HOME/.kube/config"
pod_name="memory-test"
get_pod_config_dir
}

@test "Exceeding memory constraints" {
skip "test not working see: ${issue}, ${memory_issue}"

memory_limit_size="50Mi"
allocated_size="250M"
# Create test .yaml
Expand All @@ -38,9 +31,7 @@ setup() {
}

@test "Running within memory constraints" {
skip "test not working see: ${issue}, ${memory_issue}"

memory_limit_size="200Mi"
memory_limit_size="600Mi"
allocated_size="150M"
# Create test .yaml
sed \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ spec:
limits:
memory: "${memory_size}"
requests:
memory: "100Mi"
memory: "500Mi"
command: ["stress"]
args: ["--vm", "1", "--vm-bytes", "${memory_allocated}", "--vm-hang", "1"]

0 comments on commit 129fc54

Please # to comment.