Skip to content

Commit

Permalink
Rename scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
estringana committed Jan 24, 2025
1 parent be75c7f commit 3500a27
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/run-end-to-end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ jobs:
- name: Run APPSEC_STANDALONE_V2 scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"APPSEC_STANDALONE_V2"')
run: ./run.sh APPSEC_STANDALONE_V2
- name: Run APPSEC_NO_STATS scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"APPSEC_NO_STATS"')
run: ./run.sh APPSEC_NO_STATS
- name: Run IAST_STANDALONE scenario
if: always() && steps.build.outcome == 'success' && contains(inputs.scenarios, '"IAST_STANDALONE"')
run: ./run.sh IAST_STANDALONE
Expand Down
22 changes: 22 additions & 0 deletions tests/appsec/test_asm_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,28 @@ def test_app_dependencies_loaded(self):
if not seen:
raise Exception(dependency + " not received in app-dependencies-loaded message")

@rfc("https://docs.google.com/document/d/12NBx-nD-IoQEMiCRnJXneq4Be7cbtSc6pJLOFUWTpNE/edit")
@features.appsec_standalone
@scenarios.appsec_no_stats
class Test_AppSecStandalone_NotEnabled:
"""Test expected behaviour when standalone is not enabled."""

def setup_client_computed_stats_header_is_not_present(self):
trace_id = 1212121212121212122
self.r = weblog.get(
"/",
headers={
"x-datadog-trace-id": str(trace_id),
},
)

def test_client_computed_stats_header_is_not_present(self):
spans_checked = 0
for data, _, span in interfaces.library.get_spans(request=self.r):
assert span["trace_id"] == 1212121212121212122
assert "datadog-client-computed-stats" not in [x.lower() for x, y in data["request"]["headers"]]
spans_checked += 1
assert spans_checked == 1

@rfc("https://docs.google.com/document/d/12NBx-nD-IoQEMiCRnJXneq4Be7cbtSc6pJLOFUWTpNE/edit")
@features.appsec_standalone
Expand Down
4 changes: 2 additions & 2 deletions utils/_context/_scenarios/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class _Scenarios:

profiling = ProfilingScenario("PROFILING")

asm_e2e = EndToEndScenario(
"End to end testing with default values",
appsec_no_stats = EndToEndScenario(
"End to end tests with default value of DD_TRACE_COMPUTE_STATS",
doc=(
"End to end testing with default values. Default scenario has DD_TRACE_COMPUTE_STATS=true."
"This scenario let that env to use its default"
Expand Down

0 comments on commit 3500a27

Please sign in to comment.