Skip to content

WithSecurityContextTestExecutionListener should respect NestedTestConfiguration #9193

@rwinch

Description

@rwinch

Describe the bug

In the following code testNoAnnotation should not use @WithMockUser because the mode is EnclosingConfiguration.OVERRIDE.

	@WithMockUser
	@NestedTestConfiguration(NestedTestConfiguration.EnclosingConfiguration.OVERRIDE)
	class OverrideOuterClass {

		class InnerClass {

			void testNoAnnotation() {
			}

		}

	}

To solve this WithSecurityContextTestExecutionListener should leverage TestContextAnnotationUtils.

Metadata

Metadata

Assignees

Labels

in: testAn issue in spring-security-testtype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions