Skip to content

Commit

Permalink
remove redundant manifest files
Browse files Browse the repository at this point in the history
  • Loading branch information
tariq1890 committed Sep 22, 2023
1 parent 9705abd commit 0b17932
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 714 deletions.
File renamed without changes.
5 changes: 2 additions & 3 deletions internal/render/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ import (
"os"
"path/filepath"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

"github.com/NVIDIA/gpu-operator/internal/render"
"github.com/NVIDIA/gpu-operator/internal/utils"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

type templateData struct {
Expand Down
19 changes: 10 additions & 9 deletions internal/state/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ import (
)

const (
manifestResultDir = "./golden"
manifestDir = "../../manifests"
manifestResultDir = "./testdata/golden"
)

func getYAMLString(objs []*unstructured.Unstructured) (string, error) {
Expand All @@ -66,7 +67,7 @@ func TestDriverRenderMinimal(t *testing.T) {
testName = "driver-minimal"
)

state, err := NewStateDriver(nil, nil, "./testdata")
state, err := NewStateDriver(nil, nil, manifestDir)
require.Nil(t, err)
stateDriver, ok := state.(*stateDriver)
require.True(t, ok)
Expand Down Expand Up @@ -95,7 +96,7 @@ func TestDriverRenderRDMA(t *testing.T) {
testName = "driver-rdma"
)

state, err := NewStateDriver(nil, nil, "./testdata")
state, err := NewStateDriver(nil, nil, manifestDir)
require.Nil(t, err)
stateDriver, ok := state.(*stateDriver)
require.True(t, ok)
Expand Down Expand Up @@ -177,7 +178,7 @@ func TestDriverRDMAHostMOFED(t *testing.T) {
const (
testName = "driver-rdma-hostmofed"
)
state, err := NewStateDriver(nil, nil, "./testdata")
state, err := NewStateDriver(nil, nil, manifestDir)
require.Nil(t, err)
stateDriver, ok := state.(*stateDriver)
require.True(t, ok)
Expand Down Expand Up @@ -207,7 +208,7 @@ func TestDriverRDMAHostMOFED(t *testing.T) {

func TestDriverSpec(t *testing.T) {
// Construct a sample driver state manager
state, err := NewStateDriver(nil, nil, "./testdata")
state, err := NewStateDriver(nil, nil, manifestDir)
require.Nil(t, err)
stateDriver, ok := state.(*stateDriver)
require.True(t, ok)
Expand Down Expand Up @@ -285,7 +286,7 @@ func TestDriverGDS(t *testing.T) {
testName = "driver-gds"
)

state, err := NewStateDriver(nil, nil, "./testdata")
state, err := NewStateDriver(nil, nil, manifestDir)
require.Nil(t, err)
stateDriver, ok := state.(*stateDriver)
require.True(t, ok)
Expand Down Expand Up @@ -321,7 +322,7 @@ func TestDriverAdditionalConfigs(t *testing.T) {
testName = "driver-additional-configs"
)

state, err := NewStateDriver(nil, nil, "./testdata")
state, err := NewStateDriver(nil, nil, manifestDir)
require.Nil(t, err)
stateDriver, ok := state.(*stateDriver)
require.True(t, ok)
Expand Down Expand Up @@ -379,7 +380,7 @@ func TestDriverOpenshiftDriverToolkit(t *testing.T) {
toolkitImage = "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:7fecaebc1d51b28bc3548171907e4d91823a031d7a6a694ab686999be2b4d867"
)

state, err := NewStateDriver(nil, nil, "./testdata")
state, err := NewStateDriver(nil, nil, manifestDir)
require.Nil(t, err)
stateDriver, ok := state.(*stateDriver)
require.True(t, ok)
Expand Down Expand Up @@ -423,7 +424,7 @@ func TestDriverPrecompiled(t *testing.T) {
rhcosVersion = "5.4.0-150-generic"
)

state, err := NewStateDriver(nil, nil, "./testdata")
state, err := NewStateDriver(nil, nil, manifestDir)
require.Nil(t, err)
stateDriver, ok := state.(*stateDriver)
require.True(t, ok)
Expand Down
5 changes: 0 additions & 5 deletions internal/state/testdata/0100_service_account.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions internal/state/testdata/0200_role.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions internal/state/testdata/0210_clusterrole.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions internal/state/testdata/0300_rolebinding.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions internal/state/testdata/0310_clusterrolebinding.yaml

This file was deleted.

49 changes: 0 additions & 49 deletions internal/state/testdata/0410_scc.openshift.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions internal/state/testdata/0420_proxycfg.openshift.yaml

This file was deleted.

Loading

0 comments on commit 0b17932

Please sign in to comment.