Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package two_node
package edge_topologies

import (
"context"
Expand All @@ -10,7 +10,7 @@ import (
o "github.com/onsi/gomega"

v1 "github.com/openshift/api/config/v1"
"github.com/openshift/origin/test/extended/two_node/utils"
"github.com/openshift/origin/test/extended/edge-topologies/utils"
exutil "github.com/openshift/origin/test/extended/util"
"github.com/openshift/origin/test/extended/util/image"
appv1 "k8s.io/api/apps/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package two_node
package edge_topologies

import (
"context"
Expand All @@ -10,7 +10,7 @@ import (
o "github.com/onsi/gomega"

v1 "github.com/openshift/api/config/v1"
"github.com/openshift/origin/test/extended/two_node/utils"
"github.com/openshift/origin/test/extended/edge-topologies/utils"
exutil "github.com/openshift/origin/test/extended/util"

corev1 "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package two_node
package edge_topologies

import (
"bytes"
Expand All @@ -12,7 +12,7 @@ import (

machineconfigv1 "github.com/openshift/api/machineconfiguration/v1"
machineconfigclient "github.com/openshift/client-go/machineconfiguration/clientset/versioned"
"github.com/openshift/origin/test/extended/two_node/utils"
"github.com/openshift/origin/test/extended/edge-topologies/utils"
"github.com/openshift/origin/test/extended/util/image"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package two_node
package edge_topologies

import (
"context"
Expand All @@ -16,10 +16,10 @@ import (
g "github.com/onsi/ginkgo/v2"
o "github.com/onsi/gomega"
configv1 "github.com/openshift/api/config/v1"
"github.com/openshift/origin/test/extended/two_node/utils"
"github.com/openshift/origin/test/extended/two_node/utils/apis"
"github.com/openshift/origin/test/extended/two_node/utils/core"
"github.com/openshift/origin/test/extended/two_node/utils/services"
"github.com/openshift/origin/test/extended/edge-topologies/utils"
"github.com/openshift/origin/test/extended/edge-topologies/utils/apis"
"github.com/openshift/origin/test/extended/edge-topologies/utils/core"
"github.com/openshift/origin/test/extended/edge-topologies/utils/services"
exutil "github.com/openshift/origin/test/extended/util"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -81,7 +81,7 @@ const (
virshProvisioningBridge = "ostestpr"

// Template paths (relative to test/extended/ - framework FixturePath will prefix automatically)
templateBaseDir = "testdata/two_node"
templateBaseDir = "testdata/edge-topologies"
bmhTemplatePath = templateBaseDir + "/baremetalhost-template.yaml"
machineTemplatePath = templateBaseDir + "/machine-template.yaml"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package two_node
package edge_topologies

import (
"context"
Expand All @@ -13,10 +13,10 @@ import (
o "github.com/onsi/gomega"
v1 "github.com/openshift/api/config/v1"
"github.com/openshift/origin/test/extended/etcd/helpers"
"github.com/openshift/origin/test/extended/two_node/utils"
"github.com/openshift/origin/test/extended/two_node/utils/apis"
"github.com/openshift/origin/test/extended/two_node/utils/core"
"github.com/openshift/origin/test/extended/two_node/utils/services"
"github.com/openshift/origin/test/extended/edge-topologies/utils"
"github.com/openshift/origin/test/extended/edge-topologies/utils/apis"
"github.com/openshift/origin/test/extended/edge-topologies/utils/core"
"github.com/openshift/origin/test/extended/edge-topologies/utils/services"
exutil "github.com/openshift/origin/test/extended/util"
"github.com/pkg/errors"
"go.etcd.io/etcd/api/v3/etcdserverpb"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package two_node
package edge_topologies

import (
"context"
Expand All @@ -8,7 +8,7 @@ import (
g "github.com/onsi/ginkgo/v2"
o "github.com/onsi/gomega"
v1 "github.com/openshift/api/config/v1"
"github.com/openshift/origin/test/extended/two_node/utils"
"github.com/openshift/origin/test/extended/edge-topologies/utils"
exutil "github.com/openshift/origin/test/extended/util"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"

metal3v1alpha1 "github.com/metal3-io/baremetal-operator/apis/metal3.io/v1alpha1"
"github.com/openshift/origin/test/extended/two_node/utils"
"github.com/openshift/origin/test/extended/two_node/utils/core"
"github.com/openshift/origin/test/extended/edge-topologies/utils"
"github.com/openshift/origin/test/extended/edge-topologies/utils/core"
exutil "github.com/openshift/origin/test/extended/util"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func CreateFromTemplate(templatePath string, replacements map[string]string) (st
}

// Validate template path to prevent directory traversal attacks
const allowedTemplateDir = "test/extended/testdata/two_node/"
const allowedTemplateDir = "test/extended/testdata/edge-topologies/"
if err := ValidateSafePath(normalizedPath, allowedTemplateDir); err != nil {
return "", nil, WrapError("validate template path", templatePath, err)
}
Expand Down Expand Up @@ -141,7 +141,7 @@ func CreateResourceFromTemplate(oc *exutil.CLI, templatePath string, replacement
}

// Validate template path to prevent directory traversal attacks
const allowedTemplateDir = "test/extended/testdata/two_node/"
const allowedTemplateDir = "test/extended/testdata/edge-topologies/"
if err := ValidateSafePath(normalizedPath, allowedTemplateDir); err != nil {
return WrapError("validate template path", templatePath, err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func ValidateSSHKeyPermissions(keyPath string) error {

// ValidateSafePath ensures path is within baseDir (prevents path traversal attacks).
//
// if err := ValidateSafePath(templatePath, "test/extended/testdata/two_node/"); err != nil { return err }
// if err := ValidateSafePath(templatePath, "test/extended/testdata/edge-topologies/"); err != nil { return err }
func ValidateSafePath(path, baseDir string) error {
if strings.Contains(path, "..") {
return ValidationError("path", fmt.Sprintf("contains directory traversal: %s", path))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/openshift/origin/test/extended/two_node/utils/core"
"github.com/openshift/origin/test/extended/edge-topologies/utils/core"
exutil "github.com/openshift/origin/test/extended/util"
batchv1 "k8s.io/api/batch/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

g "github.com/onsi/ginkgo/v2"
"github.com/openshift/origin/test/extended/two_node/utils/core"
"github.com/openshift/origin/test/extended/edge-topologies/utils/core"
"k8s.io/klog/v2"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/openshift/origin/test/extended/two_node/utils/core"
"github.com/openshift/origin/test/extended/edge-topologies/utils/core"
"k8s.io/klog/v2"
e2e "k8s.io/kubernetes/test/e2e/framework"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"time"

"github.com/openshift/origin/test/extended/two_node/utils/core"
"github.com/openshift/origin/test/extended/edge-topologies/utils/core"
"k8s.io/klog/v2"
e2e "k8s.io/kubernetes/test/e2e/framework"
)
Expand Down
2 changes: 1 addition & 1 deletion test/extended/include.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import (
_ "github.com/openshift/origin/test/extended/storage"
_ "github.com/openshift/origin/test/extended/tbr_health"
_ "github.com/openshift/origin/test/extended/templates"
_ "github.com/openshift/origin/test/extended/two_node"
_ "github.com/openshift/origin/test/extended/edge-topologies"
_ "github.com/openshift/origin/test/extended/user"
_ "github.com/openshift/origin/test/extended/windows"
)