Skip to content

Commit

Permalink
tests(kumactl) allow kuma-specific const to be overridden (#2582)
Browse files Browse the repository at this point in the history
* tests(kumactl) Allow kuma-specific const to be overridden

Signed-off-by: Paul Parkanzky <[email protected]>

* tests(kuma-cp) Move the rest of traceingNamespace to const

Signed-off-by: Paul Parkanzky <[email protected]>
  • Loading branch information
parkanzky authored Aug 17, 2021
1 parent dba1a9c commit a931218
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions test/framework/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var HelmSubChartPrefix = ""
var KumaNamespace = "kuma-system"
var KumaServiceName = "kuma-control-plane"
var KumaGlobalZoneSyncServiceName = "kuma-global-zone-sync"
var DefaultTracingNamespace = "kuma-tracing"

var CNIApp = "kuma-cni"
var CNINamespace = "kube-system"
Expand Down
12 changes: 5 additions & 7 deletions test/framework/deployments/tracing/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
"github.com/kumahq/kuma/test/framework"
)

const tracingNamespace = "kuma-tracing"

type k8SDeployment struct {
port uint32
}
Expand Down Expand Up @@ -45,7 +43,7 @@ func (t *k8SDeployment) Deploy(cluster framework.Cluster) error {
}

k8s.WaitUntilNumPodsCreated(cluster.GetTesting(),
cluster.GetKubectlOptions(tracingNamespace),
cluster.GetKubectlOptions(framework.DefaultTracingNamespace),
metav1.ListOptions{
LabelSelector: "app=jaeger",
},
Expand All @@ -54,7 +52,7 @@ func (t *k8SDeployment) Deploy(cluster framework.Cluster) error {
framework.DefaultTimeout)

pods := k8s.ListPods(cluster.GetTesting(),
cluster.GetKubectlOptions(tracingNamespace),
cluster.GetKubectlOptions(framework.DefaultTracingNamespace),
metav1.ListOptions{
LabelSelector: "app=jaeger",
},
Expand All @@ -64,7 +62,7 @@ func (t *k8SDeployment) Deploy(cluster framework.Cluster) error {
}

k8s.WaitUntilPodAvailable(cluster.GetTesting(),
cluster.GetKubectlOptions(tracingNamespace),
cluster.GetKubectlOptions(framework.DefaultTracingNamespace),
pods[0].Name,
framework.DefaultRetries,
framework.DefaultTimeout)
Expand All @@ -75,7 +73,7 @@ func (t *k8SDeployment) Deploy(cluster framework.Cluster) error {
}
t.port = port

cluster.(*framework.K8sCluster).PortForwardPod(tracingNamespace, pods[0].Name, port, 16686)
cluster.(*framework.K8sCluster).PortForwardPod(framework.DefaultTracingNamespace, pods[0].Name, port, 16686)
return nil
}

Expand All @@ -92,6 +90,6 @@ func (t *k8SDeployment) Delete(cluster framework.Cluster) error {
if err != nil {
return err
}
cluster.(*framework.K8sCluster).WaitNamespaceDelete(tracingNamespace)
cluster.(*framework.K8sCluster).WaitNamespaceDelete(framework.DefaultTracingNamespace)
return nil
}

0 comments on commit a931218

Please sign in to comment.