Add e2e test case for oal disable (#13295)

This commit is contained in:
Wan Kai 2025-06-05 11:47:39 +08:00 committed by GitHub
parent 1eb406771b
commit d331eb1bee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 49 additions and 1 deletions

View File

@ -31,7 +31,7 @@ setup:
verify:
retry:
count: 20
interval: 3s
interval: 10s
cases:
- includes:
- ./kafka-cases.yaml

View File

@ -22,6 +22,7 @@ services:
service: oap
volumes:
- ./oal/core.oal:/skywalking/config/oal/core.oal
- ./oal/disable.oal:/skywalking/config/oal/disable.oal
environment:
SW_API_PIPELINE_BASELINE_SERVICE_HOST: baseline-server
depends_on:

View File

@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
type: UNKNOWN
results: []
error: 'Metric: [endpoint_cpm] does not exist.'
debuggingtrace: null

View File

@ -118,3 +118,7 @@ cases:
expected: expected/baseline-OP.yml
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression="baseline(service_percentile{p='95,99'},upper)" --service-name=e2e-service-provider
expected: expected/baseline-label-OP.yml
# disable metrics
- query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics exec --expression=endpoint_cpm --endpoint-name=POST:/users --service-name=e2e-service-provider
expected: expected/disable-metrics.yml

View File

@ -0,0 +1,24 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
///////////////////////////////////////////////////////////////
//
// Disable unnecessary hard core stream, targeting @Stream#name
//
///////////////////////////////////////////////////////////////
disable(endpoint_cpm);