Skip to content

Commit

Permalink
Merge pull request #119 from ArangoGutierrez/devel/fix_gha
Browse files Browse the repository at this point in the history
Fix E2E tests data
  • Loading branch information
ArangoGutierrez authored Sep 3, 2024
2 parents 39c6136 + 8088951 commit f811579
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
8 changes: 4 additions & 4 deletions hack/e2e_tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# Copyright 2022 The Kubernetes Authors.
# Copyright 2024 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,9 +58,9 @@ if [ -z "${KUBECONFIG:-}" ]; then
fi

# Set all ENV variables for e2e tests
export ENABLE_NFD ENABLE_GPU_OPERATOR ENABLE_LOCAL_PATH_PROVISIONER
export COLLECT_LOGS_FROM LOG_ARTIFACT_DIR HELM_CHART
export E2E_IMAGE_REPO E2E_IMAGE_TAG E2E_IMAGE_PULL_POLICY
export ENABLE_NFD ENABLE_GPU_OPERATOR ENABLE_LOCAL_PATH_PROVISIONER \
COLLECT_LOGS_FROM LOG_ARTIFACT_DIR HELM_CHART \
E2E_IMAGE_REPO E2E_IMAGE_TAG E2E_IMAGE_PULL_POLICY

# shellcheck disable=SC2086
$GINKGO $GINKGO_ARGS -v ./test/e2e/...
11 changes: 9 additions & 2 deletions test/e2e/data/nimcache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,25 @@ metadata:
app.kubernetes.io/name: k8s-nim-operator
name: meta-llama3-8b-instruct
spec:
resources: {}
source:
ngc:
modelPuller: nvcr.io/nim/meta/llama3-8b-instruct:1.0.0
pullSecret: ngc-secret
authSecret: ngc-api-secret
model:
profiles: []
precision: "fp8"
lora: false
precision: "fp16"
engine: "tensorrt_llm"
qosProfile: "throughput"
gpus:
- product: "A100"
ids:
- "20b2"
tensorParallelism: "1"
resources:
cpu: 500m
memory: 20Gi
storage:
pvc:
create: true
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/data/nimservice.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
apiVersion: apps.nvidia.com/v1alpha1
kind: NIMService
metadata:
labels:
app.kubernetes.io/name: k8s-nim-operator
name: meta-llama3-8b-instruct
spec:
image:
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ var _ = BeforeSuite(func() {
// AfterSuite runs after the test suite
var _ = AfterSuite(func() {
// Clean up CRs so they are garbage collected by their controllers
cleanUpCRs()
cleanupCRs()
// Clean up Helm deployments
cleanup()
// Remove CRDs
cleanuoCRDs()
cleanupCRDs()
// Delete Test Namespace
DeleteNamespace()
})
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/nim-operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var _ = Describe("NIM Operator", func() {
cleanup()
}
// Clean up
cleanUpCRs()
cleanupCRs()
cleanup()
})

Expand Down Expand Up @@ -162,7 +162,7 @@ func cleanup() {
}
}

func cleanUpCRs() {
func cleanupCRs() {
cli, err := versioned.NewForConfig(clientConfig)
Expect(err).NotTo(HaveOccurred())

Expand Down Expand Up @@ -206,7 +206,7 @@ func cleanUpCRs() {
}
}

func cleanuoCRDs() {
func cleanupCRDs() {
crds := []string{
"nimcaches.apps.nvidia.com",
"nimservices.apps.nvidia.com",
Expand Down

0 comments on commit f811579

Please sign in to comment.