Skip to content
Merged
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
2 changes: 1 addition & 1 deletion test/e2e/features/install.feature
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ Feature: Install ClusterExtension
Then ClusterExtension is rolled out
And ClusterExtension is available
And ClusterObjectSet "${NAME}-1" phase objects are managed in Kubernetes secrets
And ClusterObjectSet "${NAME}-1" referred secrets exist in "olmv1-system" namespace
And ClusterObjectSet "${NAME}-1" referred secrets exist in "${OLM_NAMESPACE}" namespace
And ClusterObjectSet "${NAME}-1" referred secrets are immutable
And ClusterObjectSet "${NAME}-1" referred secrets contain labels
| key | value |
Expand Down
1 change: 0 additions & 1 deletion test/e2e/features/recover.feature
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ Feature: Recover cluster extension from errors that might occur during its lifet
name: busybox
securityContext:
runAsNonRoot: true
runAsUser: 1000
allowPrivilegeEscalation: false
capabilities:
drop:
Expand Down
6 changes: 0 additions & 6 deletions test/e2e/features/revision.feature
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ Feature: Install ClusterObjectSet
imagePullPolicy: IfNotPresent
name: busybox
securityContext:
runAsNonRoot: true
runAsUser: 1000
allowPrivilegeEscalation: false
Comment thread
tmshort marked this conversation as resolved.
capabilities:
drop:
Expand Down Expand Up @@ -397,8 +395,6 @@ Feature: Install ClusterObjectSet
"command": ["httpd"],
"args": ["-f", "-p", "8080"],
"securityContext": {
"runAsNonRoot": true,
"runAsUser": 1000,
"allowPrivilegeEscalation": false,
"capabilities": {
"drop": ["ALL"]
Expand Down Expand Up @@ -729,8 +725,6 @@ Feature: Install ClusterObjectSet
command: ["true"]
initialDelaySeconds: 65
securityContext:
runAsNonRoot: true
runAsUser: 1000
allowPrivilegeEscalation: false
capabilities:
drop:
Expand Down
17 changes: 15 additions & 2 deletions test/e2e/steps/steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,22 @@ import (
const (
olmDeploymentName = "operator-controller-controller-manager"
catalogdDeploymentName = "catalogd-controller-manager"
timeout = 5 * time.Minute
defaultTimeout = 5 * time.Minute
tick = 1 * time.Second
)

// timeout is the per-step wait timeout. It defaults to defaultTimeout (5m) but
// can be overridden via E2E_STEP_TIMEOUT to accommodate runtimes (e.g.
// BoxcutterRuntime) that take longer to complete an installation.
var timeout = func() time.Duration {
if s := os.Getenv("E2E_STEP_TIMEOUT"); s != "" {
if d, err := time.ParseDuration(s); err == nil {
return d
}
}
return defaultTimeout
}()
Comment thread
tmshort marked this conversation as resolved.

var (
olmNamespace = "olmv1-system"
componentNamespaces = map[string]string{} // keyed by component label (e.g. "catalogd"); falls back to olmNamespace
Expand Down Expand Up @@ -337,6 +349,7 @@ func substituteScenarioVars(content string, sc *scenarioContext) string {
"NAME": sc.clusterExtensionName,
"COS_NAME": sc.clusterObjectSetName,
"SCENARIO_ID": sc.id,
"OLM_NAMESPACE": olmNamespace,
}
for orig, param := range sc.catalogPackageNames {
vars[fmt.Sprintf("PACKAGE:%s", orig)] = param
Expand Down Expand Up @@ -1833,7 +1846,7 @@ func MarkDeploymentReadiness(ctx context.Context, deploymentName, state string)
default:
return fmt.Errorf("invalid state %s", state)
}
_, err = k8sClient("exec", podName, "-n", sc.namespace, "--", op, "/var/www/ready")
_, err = k8sClient("exec", podName, "-n", sc.namespace, "--", op, "/tmp/www/ready")
return err
}

Expand Down
10 changes: 5 additions & 5 deletions test/internal/catalog/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func buildBundle(scenarioID, packageName, version string, opts []BundleOption) (
Name: scriptCMName,
},
Data: map[string]string{
"httpd.sh": "#!/bin/sh\necho true > /var/www/started\necho true > /var/www/ready\necho true > /var/www/live\nexec httpd -f -h /var/www -p 80\n",
"httpd.sh": "#!/bin/sh\nmkdir -p /tmp/www\necho true > /tmp/www/started\necho true > /tmp/www/ready\necho true > /tmp/www/live\nexec httpd -f -h /tmp/www -p 8080\n",
},
}).
WithBundleResource("networkpolicy.yaml", &networkingv1.NetworkPolicy{
Expand Down Expand Up @@ -338,7 +338,7 @@ func buildDeploymentSpec(
Image: containerImage,
Command: []string{"/scripts/httpd.sh"},
Ports: []corev1.ContainerPort{
{ContainerPort: 80},
{ContainerPort: 8080},
},
VolumeMounts: []corev1.VolumeMount{
{
Expand All @@ -351,7 +351,7 @@ func buildDeploymentSpec(
ProbeHandler: corev1.ProbeHandler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/started",
Port: intstr.FromInt32(80),
Port: intstr.FromInt32(8080),
},
},
FailureThreshold: 30,
Expand All @@ -361,7 +361,7 @@ func buildDeploymentSpec(
ProbeHandler: corev1.ProbeHandler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/live",
Port: intstr.FromInt32(80),
Port: intstr.FromInt32(8080),
},
},
FailureThreshold: 1,
Expand All @@ -371,7 +371,7 @@ func buildDeploymentSpec(
ProbeHandler: corev1.ProbeHandler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/ready",
Port: intstr.FromInt32(80),
Port: intstr.FromInt32(8080),
},
},
InitialDelaySeconds: 1,
Expand Down