Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/bats/setup_suite.bash
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ validate_prerequisites() {

# Examples: v1, or v1beta1
export TEST_K8S_RESOURCE_API_VERSION

# For resource.k8s.io API versions before v1, a ResourceClaim spec looks
# slightly differently. Use flow-style YAML.
export TEST_DEVCLASSNAME_CD_CHANNEL="exactly: {deviceClassName: compute-domain-default-channel.nvidia.com}"
if [[ "${TEST_K8S_RESOURCE_API_VERSION}" != "v1" ]]; then
export TEST_DEVCLASSNAME_CD_CHANNEL="deviceClassName: compute-domain-default-channel.nvidia.com"
fi
}


Expand Down
6 changes: 4 additions & 2 deletions tests/bats/specs/rc-opaque-cfg-unknown-field.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ metadata:
spec:
devices:
requests:
- deviceClassName: compute-domain-default-channel.nvidia.com
name: chan
- name: chan
# This part of the ResourceClaim spec changed in
# resource.k8s.io/v1 compared to previous API versions.
${TEST_DEVCLASSNAME_CD_CHANNEL}
config:
- opaque:
driver: compute-domain.nvidia.com
Expand Down