Skip to content

Commit 6226160

Browse files
Merge pull request #17759 from danwinship/fix-networking-tests
Automatic merge from submit-queue (batch tested with PRs 17866, 18518, 18554, 18534, 17759). Fix networking tests after 1.9 rebase extended.test has some code to fix up certain tests that assume that all nodes are available to ordinary users, but that code was now failing for two different reasons: - It was identifying tests based on filenames, but most of the files in question were later moved, so the filenames were no longer correct. - Many of the tests are now declared using a `ConformanceIt()` wrapper aroung `ginkgo.It()`, which causes ginkgo's idea of what file the test is in to be wrong anyway (it thinks they're all in kubernetes/test/e2e/framework/framework.go now). This fixes it by matching on test name rather than filename (and dropping all the apparently-unnecessary checks for other tests). Fixes #17754
2 parents d7ee8d1 + d999702 commit 6226160

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

test/extended/util/test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,8 @@ func createTestingNS(baseName string, c kclientset.Interface, labels map[string]
241241
addRoleToE2EServiceAccounts(authorizationClient, []kapiv1.Namespace{*ns}, bootstrappolicy.ViewRoleName)
242242
}
243243

244-
// some test suites assume they can schedule to all nodes
245-
switch {
246-
case isPackage("/kubernetes/test/e2e/scheduler_predicates.go"),
247-
isPackage("/kubernetes/test/e2e/rescheduler.go"),
248-
isPackage("/kubernetes/test/e2e/kubelet.go"),
249-
isPackage("/kubernetes/test/e2e/common/networking.go"),
250-
isPackage("/kubernetes/test/e2e/daemon_set.go"),
251-
isPackage("/kubernetes/test/e2e/statefulset.go"):
244+
// some tests assume they can schedule to all nodes
245+
if testNameContains("Granular Checks: Pods") {
252246
allowAllNodeScheduling(c, ns.Name)
253247
}
254248

@@ -257,10 +251,6 @@ func createTestingNS(baseName string, c kclientset.Interface, labels map[string]
257251

258252
var (
259253
excludedTests = []string{
260-
// these broke in the rebase, but everything else is working
261-
`should function for intra-pod communication`,
262-
`should function for node-pod communication`,
263-
264254
`\[Skipped\]`,
265255
`\[Slow\]`,
266256
`\[Flaky\]`,

0 commit comments

Comments
 (0)