Skip to content

Commit

Permalink
Merge pull request #61 from strongdm/add-development-md
Browse files Browse the repository at this point in the history
cedar-go: add a DEVELOPMENT.md with instructions about how to update the corpus tests.
  • Loading branch information
patjakdev authored Nov 9, 2024
2 parents c3dfe27 + 7b60d16 commit fdc262f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/corpus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Upstream Integration Test Corpus Modified',
body: 'The upstream integration test corpus at https://raw.githubusercontent.com/cedar-policy/cedar-integration-tests/main/corpus-tests.tar.gz has been updated. Please integrate the changes into the local copy.',
body: 'The upstream integration test corpus at https://raw.githubusercontent.com/cedar-policy/cedar-integration-tests/main/corpus-tests.tar.gz has been updated. Please integrate the changes into the local copy; see DEVELOPMENT.md for instructions on how to do so.',
assignees: ['jmccarthy', 'philhassey', 'patjakdev'],
labels: ['upstream-corpus-test']
})
Expand Down
19 changes: 19 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Common Workflows

## Updating the Corpus Tests

A periodic Github action checks to make sure that the local copy of the Cedar corpus test tarball matches the upstream version generated by the AWS team.

This action opens a Github Issue when it detects that a change has occurred ([example](https://github.com/cedar-policy/cedar-go/issues/52)) that should be resolved by updating the corpus test tarball in the cedar-go repository and ensuring that they still pass with the new version. The Cedar team does occasionally make breaking changes to the format of the tests, so bringing them up to date may be a non-trivial amount of work.

To update the test tarball, run the following command:

```bash
curl -L -o corpus-tests.tar.gz https://raw.githubusercontent.com/cedar-policy/cedar-integration-tests/main/corpus-tests.tar.gz
```

Then, run the corpus tests and fix any tests that may be broken:

```bash
go test ./corpus_test.go
```

0 comments on commit fdc262f

Please sign in to comment.