@@ -32,6 +32,7 @@ import (
32
32
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
33
33
"k8s.io/apimachinery/pkg/labels"
34
34
"k8s.io/apimachinery/pkg/util/wait"
35
+ "k8s.io/klog/v2"
35
36
"k8s.io/klog/v2/klogr"
36
37
"k8s.io/kubernetes/test/e2e/framework"
37
38
"k8s.io/kubernetes/test/e2e/framework/skipper"
@@ -1511,7 +1512,19 @@ func Describe(deployment, describe, what string, f func(d *Deployment)) bool {
1511
1512
}
1512
1513
1513
1514
// DefineTests must be called to register all tests defined so far via Describe.
1515
+ //
1516
+ // They are placed inside a "Deploy" node because:
1517
+ // - The order of specs inside a node is not randomized by default,
1518
+ // which is what we want, in contrast to the top-level nodes,
1519
+ // which always get randomized (https://github.com/onsi/ginkgo/issues/966#issuecomment-1110046593).
1520
+ // - It is easier to focus on specific tests with, for example, "Deploy operator".
1521
+ // "^operator" does not work because the internal test name string has some
1522
+ // builtin, hidden string at the beginning (something like "top level").
1514
1523
func DefineTests () {
1524
+ ginkgo .Context ("Deploy" , defineTests )
1525
+ }
1526
+
1527
+ func defineTests () {
1515
1528
all := allDeployments [:]
1516
1529
for deploymentName := range tests {
1517
1530
if ! haveDeployment (all , deploymentName ) {
@@ -1527,6 +1540,7 @@ func DefineTests() {
1527
1540
deploymentName := deploymentName
1528
1541
for describe , funcs := range group {
1529
1542
funcs := funcs
1543
+ klog .InfoS ("defining tests" , "deployment" , deploymentName , "test" , describe )
1530
1544
ginkgo .Describe (describe , func () {
1531
1545
var deployment * Deployment
1532
1546
if deploymentName != "" {
0 commit comments