CodeCommit

Implementation details for API codecommit

Coverage Overview

CodeCommit is supported by LocalStack only in the pro image.

AvailabilityTesting*
OperationImplementedImageInternal Test SuiteExternal Test SuiteTerraform ValidatedAWS ValidatedSnapshot TestedDetails
AssociateApprovalRuleTemplateWithRepository
BatchAssociateApprovalRuleTemplateWithRepositories
BatchDescribeMergeConflicts
BatchDisassociateApprovalRuleTemplateFromRepositories
BatchGetCommits
BatchGetRepositories
CreateApprovalRuleTemplate
CreateBranch✔️pro✔️Show Tests
CreateCommit✔️pro✔️Show Tests
CreatePullRequest✔️pro✔️Show Tests
CreatePullRequestApprovalRule
CreateRepository✔️pro✔️✔️Show Tests
CreateUnreferencedMergeCommit
DeleteApprovalRuleTemplate
DeleteBranch✔️pro✔️Show Tests
DeleteCommentContent
DeleteFile
DeletePullRequestApprovalRule
DeleteRepository✔️pro✔️Show Tests
DescribeMergeConflicts
DescribePullRequestEvents
DisassociateApprovalRuleTemplateFromRepository
EvaluatePullRequestApprovalRules
GetApprovalRuleTemplate
GetBlob
GetBranch✔️pro✔️Show Tests
GetComment
GetCommentReactions
GetCommentsForComparedCommit
GetCommentsForPullRequest
GetCommit
GetDifferences
GetFile✔️pro✔️Show Tests
GetFolder✔️pro✔️Show Tests
GetMergeCommit
GetMergeConflicts
GetMergeOptions
GetPullRequest
GetPullRequestApprovalStates
GetPullRequestOverrideState
GetRepository✔️pro✔️Show Tests
GetRepositoryTriggers
ListApprovalRuleTemplates
ListAssociatedApprovalRuleTemplatesForRepository
ListBranches
ListFileCommitHistory
ListPullRequests✔️pro✔️Show Tests
ListRepositories✔️pro
ListRepositoriesForApprovalRuleTemplate
ListTagsForResource✔️pro✔️Show Tests
MergeBranchesByFastForward
MergeBranchesBySquash
MergeBranchesByThreeWay
MergePullRequestByFastForward
MergePullRequestBySquash
MergePullRequestByThreeWay
OverridePullRequestApprovalRules
PostCommentForComparedCommit
PostCommentForPullRequest
PostCommentReply
PutCommentReaction
PutFile
PutRepositoryTriggers
TagResource✔️pro✔️Show Tests
TestRepositoryTriggers
UntagResource✔️pro✔️Show Tests
UpdateApprovalRuleTemplateContent
UpdateApprovalRuleTemplateDescription
UpdateApprovalRuleTemplateName
UpdateComment
UpdateDefaultBranch
UpdatePullRequestApprovalRuleContent
UpdatePullRequestApprovalState
UpdatePullRequestDescription
UpdatePullRequestStatus
UpdatePullRequestTitle
UpdateRepositoryDescription
UpdateRepositoryEncryptionKey
UpdateRepositoryName

Terminology

  • Internal Test Suite: tested by LocalStack's internal integration test suite
  • External Test Suite: covered by an external integration test suite, that runs against LocalStack
  • Terraform Validated: operation tested with Terraform
  • AWS Validated: the integration test that includes this operation call was validated against AWS
  • Snapshot Tested: the operation is part of a snapshot parity test, which verifies the responses by LocalStack and AWS are the same

Testing Details

This section gives an overview about the internal integration test suite and the specific test cases that recorded the API call.

How to read the test details?

For each operation we put up a list of the related integration test cases.
Those operation calls have been recorded during the execution of the outlined test cases. Some calls might be internal, i.e., they are not explicitly called in the test, but are triggered implicitly by the LocalStack framework.

  • Parameters: The tests are ordered by the parameters used, which are highlighted in bold.
  • Test Details: LocalStack Community or LocalStack Pro indicates where the test originates. For each test you see:
    • test name
    • status code returned (which is the expected one for the test case)
    • information about validation:
      • AWS validated the test is validated against AWS, meaning it run successfully against real AWS as well
      • Snapshot Tested this is a snapshot parity test, meaning the responses are validated against AWS


CreateBranch

Parameters: branchName, commitId, repositoryName
  • LocalStack Pro
    • test_create_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_branch HTTP Status Code: 200
    • test_create_pull_request LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_pull_request HTTP Status Code: 200
    • test_delete_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_branch HTTP Status Code: 200
    • test_get_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_branch HTTP Status Code: 200
    • test_list_pull_requests LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_list_pull_requests HTTP Status Code: 200
    • test_create_branch_on_non_existing_repository_raises_error LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_branch_on_non_existing_repository_raises_error HTTP Status Code: 400 (RepositoryDoesNotExistException)

CreateCommit

Parameters: authorName, branchName, commitMessage, email, putFiles, repositoryName
  • LocalStack Pro
    • test_create_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_branch HTTP Status Code: 200
    • test_create_commit LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_commit HTTP Status Code: 200
    • test_create_pull_request LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_pull_request HTTP Status Code: 200
    • test_delete_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_branch HTTP Status Code: 200
    • test_delete_non_existing_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_non_existing_branch HTTP Status Code: 200
    • test_get_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_branch HTTP Status Code: 200
    • test_get_file LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_file HTTP Status Code: 200
    • test_get_folder LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_folder HTTP Status Code: 200
    • test_get_non_existing_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_non_existing_branch HTTP Status Code: 200
    • test_list_pull_requests LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_list_pull_requests HTTP Status Code: 200
    • test_commit_to_non_existing_repository_raises_error LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_commit_to_non_existing_repository_raises_error HTTP Status Code: 400 (RepositoryDoesNotExistException)

CreatePullRequest

Parameters: clientRequestToken, description, targets, title
  • LocalStack Pro
    • test_create_pull_request LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_pull_request HTTP Status Code: 200
    • test_list_pull_requests LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_list_pull_requests HTTP Status Code: 200

CreateRepository

Parameters: repositoryDescription, repositoryName
  • LocalStack Pro
    • test_create_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_branch HTTP Status Code: 200
    • test_create_commit LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_commit HTTP Status Code: 200
    • test_create_pull_request LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_pull_request HTTP Status Code: 200
    • test_create_repository LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_repository HTTP Status Code: 200
    • test_delete_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_branch HTTP Status Code: 200
    • test_delete_non_existing_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_non_existing_branch HTTP Status Code: 200
    • test_delete_repository_matches_created_repository LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_repository_matches_created_repository HTTP Status Code: 200
    • test_get_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_branch HTTP Status Code: 200
    • test_get_file LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_file HTTP Status Code: 200
    • test_get_folder LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_folder HTTP Status Code: 200
    • test_get_non_existing_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_non_existing_branch HTTP Status Code: 200
    • test_get_repository_matches_created_repository LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_repository_matches_created_repository HTTP Status Code: 200
    • test_list_pull_requests LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_list_pull_requests HTTP Status Code: 200
    • test_repository_lifecycle LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_repository_lifecycle HTTP Status Code: 200
    • test_create_repository_with_invalid_name_raises_error LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_repository_with_invalid_name_raises_error HTTP Status Code: 400 (InvalidRepositoryNameException)

DeleteBranch

Parameters: branchName, repositoryName
  • LocalStack Pro
    • test_delete_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_branch HTTP Status Code: 200
    • test_delete_non_existing_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_non_existing_branch HTTP Status Code: 400 (BranchDoesNotExistException)

DeleteRepository

Parameters: repositoryName
  • LocalStack Pro
    • test_create_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_branch HTTP Status Code: 200
    • test_create_commit LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_commit HTTP Status Code: 200
    • test_create_pull_request LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_pull_request HTTP Status Code: 200
    • test_create_repository LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_create_repository HTTP Status Code: 200
    • test_delete_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_branch HTTP Status Code: 200
    • test_delete_non_existing_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_non_existing_branch HTTP Status Code: 200
    • test_delete_repository_matches_created_repository LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_repository_matches_created_repository HTTP Status Code: 200
    • test_get_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_branch HTTP Status Code: 200
    • test_get_file LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_file HTTP Status Code: 200
    • test_get_folder LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_folder HTTP Status Code: 200
    • test_get_non_existing_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_non_existing_branch HTTP Status Code: 200
    • test_get_repository_matches_created_repository LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_repository_matches_created_repository HTTP Status Code: 200
    • test_list_pull_requests LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_list_pull_requests HTTP Status Code: 200
    • test_repository_lifecycle LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_repository_lifecycle HTTP Status Code: 200
    • test_delete_non_existing_repository_raises_error LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_non_existing_repository_raises_error HTTP Status Code: 400 (RepositoryDoesNotExistException)
    • test_delete_repository_matches_created_repository LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_delete_repository_matches_created_repository HTTP Status Code: 400 (RepositoryDoesNotExistException)

GetBranch

Parameters: branchName, repositoryName
  • LocalStack Pro
    • test_get_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_branch HTTP Status Code: 200
    • test_get_non_existing_branch LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_non_existing_branch HTTP Status Code: 400 (BranchDoesNotExistException)

GetFile

Parameters: commitSpecifier, filePath, repositoryName
  • LocalStack Pro
    • test_get_file LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_file HTTP Status Code: 200

GetFolder

Parameters: commitSpecifier, folderPath, repositoryName
  • LocalStack Pro
    • test_get_folder LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_folder HTTP Status Code: 200

GetRepository

Parameters: repositoryName
  • LocalStack Pro
    • test_get_repository_matches_created_repository LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_repository_matches_created_repository HTTP Status Code: 200
    • test_get_non_existing_repository_raises_error LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_get_non_existing_repository_raises_error HTTP Status Code: 400 (RepositoryDoesNotExistException)

ListPullRequests

Parameters: repositoryName
  • LocalStack Pro
    • test_list_pull_requests LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_list_pull_requests HTTP Status Code: 200

ListTagsForResource

Parameters: resourceArn
  • LocalStack Pro
    • test_tagging LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_tagging HTTP Status Code: 200

TagResource

Parameters: resourceArn, tags
  • LocalStack Pro
    • test_tagging LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_tagging HTTP Status Code: 200

UntagResource

Parameters: resourceArn, tagKeys
  • LocalStack Pro
    • test_tagging LocalStack Pro: tests/aws/services/codecommit/test_codecommit.py::TestCodeCommit::test_tagging HTTP Status Code: 200