<commit_before>Feature: PromotionResult UPDATE APIs

  As a RESTful client or user
  I should be able to update promotionResult for the existing deployments in the system


  @wip
  Scenario: Updating the PromotionResult for a deployment

    Given there is a deployment
    When I PUT "/api/deployments/1/promotions" with:
    """
      {
        "name"  : "jenkins-smoke",
        "status" : "SUCCESS",
        "resultsUrl" : "http://local.lookout.com/jenkins/job-id/2/results"
      }
    """
    Then the response should be 204


  @wip
  Scenario: Updating the PromotionResult for deployment that doesn't exist

    When I PUT "/api/deployments/1/promotions" with:
    """
      {
        "name"  : "jenkins-smoke",
        "status" : "SUCCESS",
        "resultsUrl" : "http://local.lookout.com/jenkins/job-id/2/results"
      }
    """
    Then the response should be 404


  @wip @error
  Scenario: Updating the PromotionResult for promotion that doesn't exist in deployment

    When I PUT "/api/deployments/1/promotions" with:
    """
      {
        "name"  : "test-smoke",
        "status" : "FAILED",
        "resultsUrl" : "http://local.lookout.com/jenkins/job-id/2/results"
      }
    """
    Then the response should be 404
    <commit_msg>Promotion Results are added to Deployment by REST API, not updated<commit_after>Feature: Promotion Result APIs

  As a RESTful client or user
  I should be able to add Promotion result for a Deployment in the system


  @wip
  Scenario: Adding a result for a Promotion associated with a Deployment

    Given there is a deployment
    When I POST to "/api/deployments/1/promotions" with:
    """
      {
        "name"  : "jenkins-smoke",
        "status" : "SUCCESS",
        "infoUrl" : "http://local.lookout.com/jenkins/job-id/2/results"
      }
    """
    Then the response should be 204


  @wip
  Scenario: Adding Promotion result for a Deployment that doesn't exist

    When I POST to "/api/deployments/1/promotions" with:
    """
      {
        "name"  : "jenkins-smoke",
        "status" : "SUCCESS",
        "infoUrl" : "http://local.lookout.com/jenkins/job-id/2/results"
      }
    """
    Then the response should be 404


  @wip @error
  Scenario: Adding a result for a Promotion which is not associated with the Deployment

    When I POST to "/api/deployments/1/promotions" with:
    """
      {
        "name"  : "test-smoke",
        "status" : "FAILED",
        "infoUrl" : "http://local.lookout.com/jenkins/job-id/2/results"
      }
    """
    Then the response should be 404
{'fraction_non_alphanumeric': 0.1111545988258317, 'fraction_numerical': 0.011741682974559686, 'mean_word_length': 2.403462050599201, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2641581', 'n_tokens_mistral': 855, 'n_tokens_neox': 790, 'n_words': 243}