diff --git a/plugin/sampling/strategystore/static/fixtures/probablistic_with_default_operation_strategy.json b/plugin/sampling/strategystore/static/fixtures/TestServiceNoPerOperationStrategies_response_for_ServiceA.json similarity index 71% rename from plugin/sampling/strategystore/static/fixtures/probablistic_with_default_operation_strategy.json rename to plugin/sampling/strategystore/static/fixtures/TestServiceNoPerOperationStrategies_response_for_ServiceA.json index a37cf3c42be..a398dd62a85 100644 --- a/plugin/sampling/strategystore/static/fixtures/probablistic_with_default_operation_strategy.json +++ b/plugin/sampling/strategystore/static/fixtures/TestServiceNoPerOperationStrategies_response_for_ServiceA.json @@ -7,7 +7,9 @@ "perOperationStrategies": [ { "operation": "/health", - "probabilisticSampling": {} + "probabilisticSampling": { + "samplingRate": 0.1 + } } ] } diff --git a/plugin/sampling/strategystore/static/fixtures/ratelimiting_with_default_operation_strategy.json b/plugin/sampling/strategystore/static/fixtures/TestServiceNoPerOperationStrategies_response_for_ServiceB.json similarity index 73% rename from plugin/sampling/strategystore/static/fixtures/ratelimiting_with_default_operation_strategy.json rename to plugin/sampling/strategystore/static/fixtures/TestServiceNoPerOperationStrategies_response_for_ServiceB.json index 1ac2c0c0e39..2a4c6efdd10 100644 --- a/plugin/sampling/strategystore/static/fixtures/ratelimiting_with_default_operation_strategy.json +++ b/plugin/sampling/strategystore/static/fixtures/TestServiceNoPerOperationStrategies_response_for_ServiceB.json @@ -8,7 +8,9 @@ "perOperationStrategies": [ { "operation": "/health", - "probabilisticSampling": {} + "probabilisticSampling": { + "samplingRate": 0.1 + } } ] } diff --git a/plugin/sampling/strategystore/static/fixtures/service_no_per_operation.json b/plugin/sampling/strategystore/static/fixtures/service_no_per_operation.json index 979c5639027..16f2fdcb794 100644 --- a/plugin/sampling/strategystore/static/fixtures/service_no_per_operation.json +++ b/plugin/sampling/strategystore/static/fixtures/service_no_per_operation.json @@ -18,7 +18,7 @@ { "operation": "/health", "type": "probabilistic", - "param": 0.0 + "param": 0.1 } ] } diff --git a/plugin/sampling/strategystore/static/strategy_store_test.go b/plugin/sampling/strategystore/static/strategy_store_test.go index b00c39dbc95..9fa498f1050 100644 --- a/plugin/sampling/strategystore/static/strategy_store_test.go +++ b/plugin/sampling/strategystore/static/strategy_store_test.go @@ -473,7 +473,7 @@ func TestServiceNoPerOperationStrategies(t *testing.T) { // expected response for ServiceA (which has probablistic service level sampling strategy) // shall contain /health operation with default service level sampling strategy as well - expectedServiceAResponse, errServiceA := makeServiceStrategyResponseFromFile("fixtures/probablistic_with_default_operation_strategy.json") + expectedServiceAResponse, errServiceA := makeServiceStrategyResponseFromFile("fixtures/TestServiceNoPerOperationStrategies_response_for_ServiceA.json") require.NoError(t, errServiceA) strategy, err := store.GetSamplingStrategy(context.Background(), "ServiceA") @@ -483,8 +483,8 @@ func TestServiceNoPerOperationStrategies(t *testing.T) { assert.Equal(t, expectedServiceAResponse, strategy) // expected response for ServiceB (which has ratelimiting service level sampling strategy) - // shall contain /health operation with sampling probability taken from defaul operation level strategy - expectedServiceBResponse, errServiceB := makeServiceStrategyResponseFromFile("fixtures/ratelimiting_with_default_operation_strategy.json") + // shall contain /health operation with sampling probability taken from default operation level strategy + expectedServiceBResponse, errServiceB := makeServiceStrategyResponseFromFile("fixtures/TestServiceNoPerOperationStrategies_response_for_ServiceB.json") require.NoError(t, errServiceB) strategy, err = store.GetSamplingStrategy(context.Background(), "ServiceB")