Skip to content

Commit 5f9a9e0

Browse files
authored
Skip operator privilege action test on release builds (elastic#119386)
The `testEveryActionIsEitherOperatorOnlyOrNonOperator` test has been reliably muted because release builds frequently miss actions due to disabled feature flags. There's no straight-forward way to account for this. This PR changes the test to only run on snapshot builds. This way we get test coverage while reducing maintenance burden. Closes: elastic#118220
1 parent 8ded6c4 commit 5f9a9e0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@ tests:
196196
- class: org.elasticsearch.xpack.searchablesnapshots.RetrySearchIntegTests
197197
method: testSearcherId
198198
issue: https://github.com/elastic/elasticsearch/issues/118374
199-
- class: org.elasticsearch.xpack.security.operator.OperatorPrivilegesIT
200-
method: testEveryActionIsEitherOperatorOnlyOrNonOperator
201-
issue: https://github.com/elastic/elasticsearch/issues/118220
202199
- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT
203200
issue: https://github.com/elastic/elasticsearch/issues/118238
204201
- class: org.elasticsearch.reservedstate.service.FileSettingsServiceTests

x-pack/plugin/security/qa/operator-privileges-tests/src/javaRestTest/java/org/elasticsearch/xpack/security/operator/OperatorPrivilegesIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
package org.elasticsearch.xpack.security.operator;
88

9+
import org.elasticsearch.Build;
910
import org.elasticsearch.client.Request;
1011
import org.elasticsearch.client.RequestOptions;
1112
import org.elasticsearch.client.Response;
@@ -165,6 +166,7 @@ public void testServiceAccountUpdateOperatorSettings() throws IOException {
165166

166167
@SuppressWarnings("unchecked")
167168
public void testEveryActionIsEitherOperatorOnlyOrNonOperator() throws IOException {
169+
assumeTrue("Exclude release builds due to maintenance burden around feature flags", Build.current().isSnapshot());
168170
final String message = "An action should be declared to be either operator-only in ["
169171
+ DefaultOperatorOnlyRegistry.class.getName()
170172
+ "] or non-operator in ["

0 commit comments

Comments
 (0)