[no-relnote] Allow relative paths from operator structs

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2025-03-13 14:51:22 +02:00
parent a72050442e
commit ed9310dc37
No known key found for this signature in database
2 changed files with 1 additions and 7 deletions

View File

@ -20,8 +20,6 @@ import "path/filepath"
const ( const (
defaultRuntimeName = "nvidia" defaultRuntimeName = "nvidia"
defaultRoot = "/usr/bin"
) )
// Runtime defines a runtime to be configured. // Runtime defines a runtime to be configured.
@ -48,9 +46,6 @@ func GetRuntimes(opts ...Option) Runtimes {
opt(c) opt(c)
} }
if c.root == "" {
c.root = defaultRoot
}
if c.nvidiaRuntimeName == "" { if c.nvidiaRuntimeName == "" {
c.nvidiaRuntimeName = defaultRuntimeName c.nvidiaRuntimeName = defaultRuntimeName
} }

View File

@ -27,7 +27,6 @@ func TestOptions(t *testing.T) {
testCases := []struct { testCases := []struct {
setAsDefault bool setAsDefault bool
nvidiaRuntimeName string nvidiaRuntimeName string
root string
expectedDefaultRuntime string expectedDefaultRuntime string
expectedRuntimes Runtimes expectedRuntimes Runtimes
}{ }{
@ -131,7 +130,7 @@ func TestOptions(t *testing.T) {
runtimes := GetRuntimes( runtimes := GetRuntimes(
WithNvidiaRuntimeName(tc.nvidiaRuntimeName), WithNvidiaRuntimeName(tc.nvidiaRuntimeName),
WithSetAsDefault(tc.setAsDefault), WithSetAsDefault(tc.setAsDefault),
WithRoot(tc.root), WithRoot("/usr/bin"),
) )
require.EqualValues(t, tc.expectedRuntimes, runtimes) require.EqualValues(t, tc.expectedRuntimes, runtimes)