MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / TestGetDriverAppNameRHCOS

Function TestGetDriverAppNameRHCOS

internal/state/driver_test.go:582–604  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

580}
581
582func TestGetDriverAppNameRHCOS(t *testing.T) {
583 cr := &nvidiav1alpha1.NVIDIADriver{
584 ObjectMeta: metav1.ObjectMeta{
585 UID: apitypes.UID("d5b3a1f2-38a9-4b72-bff1-21fd569fd305"),
586 },
587 Spec: nvidiav1alpha1.NVIDIADriverSpec{
588 DriverType: nvidiav1alpha1.GPU,
589 },
590 }
591
592 pool := nodePool{
593 osRelease: "rhcos",
594 osVersion: "4.14",
595 rhcosVersion: "414.92.202309282257",
596 }
597 var err error
598 pool.osTag, err = getOSTag(pool.osRelease, pool.osVersion)
599 assert.NoError(t, err)
600
601 actual := getDriverAppName(cr, pool)
602 expected := "nvidia-gpu-driver-rhcos4.14-6f4fc4fc6"
603 assert.Equal(t, expected, actual)
604}
605
606func TestVGPUHostManagerDaemonset(t *testing.T) {
607 const (

Callers

nothing calls this directly

Calls 2

getOSTagFunction · 0.85
getDriverAppNameFunction · 0.85

Tested by

no test coverage detected