GoogleCloudPlatform / gke-networking-recipes

Apache License 2.0
307 stars 85 forks source link

Add basic testing framework for gke-networking-recipes #131

Closed songrx1997 closed 1 year ago

songrx1997 commented 1 year ago

This PR creates a testing framework which will handle the following for future recipe prow tests:

  1. Set up a GCP project for the tests (through boskos when running in Prow)
  2. Create a GKE cluster
  3. Set up Kubernetes clients for the cluster
  4. Delete the cluster after tests
  5. Add a script the run the test
songrx1997 commented 1 year ago

Hey @bowei, could you review this? Thanks!

boredabdel commented 1 year ago

Hi,

Is the review on this urgent ? Can it wait few weeks ?

bowei commented 1 year ago

/assign

songrx1997 commented 1 year ago

cc @swetharepakula

bowei commented 1 year ago

Please split the automatic code updates (e.g. go mod vendor etc) from the human changes into separate commits. If you can setup a session (10 minutes) to walk through and demo the tests, that would be useful...

songrx1997 commented 1 year ago

Hi @bowei , just addressed your comments. Could you review this? Thanks

bowei commented 1 year ago

Generally the change looks good. Ping when the comments are resolved.

songrx1997 commented 1 year ago

Seems like some lint rules failed for links in vendor not found. Can we ignore these checks for /vendor?

bowei commented 1 year ago

Can we fix the doc linting OR state explicitly that it won't pass and why. Otherwise looks ok.

songrx1997 commented 1 year ago

Can we fix the doc linting OR state explicitly that it won't pass and why. Otherwise looks ok.

Hi @bowei, just removed all the .md files in vendor. All checks passed.

bowei commented 1 year ago

I think the solution is not the delete the files but to ignore the files in vendor/ from the lint....

Can we fix the doc linting OR state explicitly that it won't pass and why. Otherwise looks ok.

Hi @bowei, just removed all the .md files in vendor. All checks passed.

bowei commented 1 year ago

You should change:

.github/workflows/documentation.yaml

jobs:
  linting:
    name: Documentation linting
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: 3.9
      - name: Markdown links
        uses: gaurav-nelson/github-action-markdown-link-check@v1
        with:
          config-file: '.mlc_config.json'
          base-branch: main
          folder-path:
            - archive
            - gateway
            - gateway-api
            - ingress
            - service-directory
            - services
          file-path:
            - cluster-setup.md
            - CONTRIBUTING.md
            - README.md
boredabdel commented 1 year ago

https://github.com/GoogleCloudPlatform/gke-networking-recipes/pull/141

bowei commented 1 year ago

@songrx1997 -- can you trigger a new test run to check that we got rid of the markdown errors?

songrx1997 commented 1 year ago

@songrx1997 -- can you trigger a new test run to check that we got rid of the markdown errors?

@bowei file checks passed