github.com/Azure/aad-pod-identity@v1.8.17/website/content/en/docs/Contributing/_index.md (about)

     1  ---
     2  title: "Contributing"
     3  linkTitle: "Contributing"
     4  weight: 7
     5  date: 2020-10-04
     6  description: >
     7    The AAD Pod Identity project welcomes contributions and suggestions.
     8  ---
     9  
    10  ## CLA
    11  
    12  The AAD Pod Identity project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).
    13  
    14  When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
    15  
    16  ## Development
    17  
    18  ### Prerequisites
    19  
    20  - Go 1.18
    21  - Docker
    22  - an AKS cluster
    23  - Helm 3
    24  - A container registry. One of the following would work:
    25    - Dockerhub
    26    - Azure Container Registry (ACR)
    27  
    28  ### Development flow
    29  
    30  ```bash
    31  git clone https://github.com/Azure/aad-pod-identity ${GOPATH}/src/github.com/Azure/aad-pod-identity
    32  cd ${GOPATH}/src/github.com/Azure/aad-pod-identity
    33  
    34  export REGISTRY=<RegistryName>
    35  
    36  # Build MIC and NMI images
    37  make image-mic image-nmi
    38  
    39  # push images to your container registry
    40  make push-mic push-nmi
    41  
    42  # install the above images on your cluster
    43  helm install aad-pod-identity manifest_staging/charts/aad-pod-identity \
    44    --set image.repository="${REGISTRY}" \
    45    --set mic.tag=v0.0.0-dev \
    46    --set nmi.tag=v0.0.0-dev
    47  ```
    48  
    49  ## Test Standard
    50  
    51  ### Unit tests
    52  
    53  Unit tests focus on testing individual units and components of aad-pod-identity and they don't require any additional services to execute. They should be fast and great for getting the first signal on whether the implementation works or not. To run unit tests:
    54  
    55  ```bash
    56  make unit-test
    57  ```
    58  
    59  In most cases, pull requests should include an adequate amount of unit tests such that the code coverage of the pull request may not lessen the code coverage of the  main branch.
    60  
    61  ### End-to-end tests
    62  
    63  End-to-end testing tests whether the flow of aad-pod-identity from start to finish is behaving as expected. Following guidelines should be followed when developing E2E tests:
    64  
    65  - Use the aad-pod-identity e2e test framework.
    66  
    67  - Define test spec reflecting real user workflow, e.g. [creation of AzureIdentity, AzureIdentityBinding and a pod that consumes the identity](https://github.com/Azure/aad-pod-identity/blob/5c9c5e541d6612c31af4d09dc0ec7654388cc076/test/e2e/single_identity_test.go#L33-L96).
    68  
    69  See [test/e2e/README.md](https://github.com/Azure/aad-pod-identity/blob/master/test/e2e/README.md) on how to run the aad-pod-identity e2e test suite locally.