From 13d7b2aa6ccf1a27b265f3d0fc2eaacfd3dfedeb Mon Sep 17 00:00:00 2001 From: michaelboulton Date: Sat, 11 May 2024 16:50:02 +0100 Subject: [PATCH] Remove requirement for 'name' in variable files (#923) * Remove requirement for 'name' in variable files * Add test case --- tavern/_core/schema/tests.jsonschema.yaml | 3 --- tests/integration/test_include.tavern.yaml | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/tavern/_core/schema/tests.jsonschema.yaml b/tavern/_core/schema/tests.jsonschema.yaml index 371f42f3..75f43486 100644 --- a/tavern/_core/schema/tests.jsonschema.yaml +++ b/tavern/_core/schema/tests.jsonschema.yaml @@ -44,9 +44,6 @@ definitions: type: object additionalProperties: false - required: - - name - properties: name: type: string diff --git a/tests/integration/test_include.tavern.yaml b/tests/integration/test_include.tavern.yaml index 4e2d45c7..f0dc11b9 100644 --- a/tests/integration/test_include.tavern.yaml +++ b/tests/integration/test_include.tavern.yaml @@ -14,6 +14,26 @@ stages: status_code: 200 json: !include 881_1.json +--- +test_name: Test using variables directly + +includes: + - !include common.yaml + - variables: + full_path: "echo" + +stages: + - name: Send included json + request: + url: "{host}/{full_path}" + method: POST + json: + hell: o + response: + status_code: 200 + json: + hell: o + --- test_name: Test including json with key