mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Add changelog entry for config.json path changes
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -18,7 +18,6 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -29,15 +28,12 @@ import (
|
||||
)
|
||||
|
||||
func TestArgsGetConfigFilePath(t *testing.T) {
|
||||
wd, err := os.Getwd()
|
||||
require.NoError(t, err)
|
||||
|
||||
testCases := []struct {
|
||||
bundleDir string
|
||||
ociSpecPath string
|
||||
}{
|
||||
{
|
||||
ociSpecPath: fmt.Sprintf("%v/config.json", wd),
|
||||
ociSpecPath: "config.json",
|
||||
},
|
||||
{
|
||||
bundleDir: "/foo/bar",
|
||||
|
||||
@@ -154,11 +154,10 @@ func isBundleFlag(arg string) bool {
|
||||
}
|
||||
|
||||
// getOCISpecFilePath returns the expected path to the OCI specification file for the given
|
||||
// bundle directory or the current working directory if not specified.
|
||||
// bundle directory. If the bundle directory is empty, only `config.json` is returned.
|
||||
func getOCISpecFilePath(bundleDir string) (string, error) {
|
||||
logger.Infof("Using bundle directory: %v", bundleDir)
|
||||
|
||||
// if bundleDir not specified, use "config.json" directly as cwd will always be the bundle path
|
||||
OCISpecFilePath := filepath.Join(bundleDir, ociSpecFileName)
|
||||
|
||||
logger.Infof("Using OCI specification file path: %v", OCISpecFilePath)
|
||||
|
||||
Reference in New Issue
Block a user