From 79db17b5103194e01d095547fa07f428020f5553 Mon Sep 17 00:00:00 2001 From: Justin Moore Date: Tue, 5 Sep 2023 13:13:30 -0500 Subject: [PATCH] Add a new test for `report.extension_data` --- src/ApiService/Tests/TemplateTests.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/ApiService/Tests/TemplateTests.cs b/src/ApiService/Tests/TemplateTests.cs index 97d8641eb8..0d44732975 100644 --- a/src/ApiService/Tests/TemplateTests.cs +++ b/src/ApiService/Tests/TemplateTests.cs @@ -32,6 +32,11 @@ public class TemplateTests { // * Change "{% ... %}" in python to "{{ ... }}" private static readonly string _testString3 = "The fuzzing target ({{ job.project }} {{ job.name }} {{ job.build }}) reported a crash.
{{ if report.asan_log }} AddressSanitizer reported the following details:
 {{ report.asan_log }} 
{{ else }} Faulting call stack:
{{ end }} You can reproduce the issue remotely in OneFuzz by running the following command:
 {{ repro_cmd }} 
"; + // Ensure that extension data gets picked up. + private static readonly string _testString4 = "Artifacts: \nInitially found in: \n"; + + private static readonly string _testString4Artifacts = """[{"desc": "Super duper sekrit artifacts","name": "Abc","url": "https://onefuzz.microsoft.com/api/download?container=abc123&filename=le_crash.zip"}]"""; + private static readonly string _jinjaIfStatement = "{% if report.asan_log %} AddressSanitizer reported the following details:
 {{ report.asan_log }} 
{% else %} Faulting call stack: