Skip to content

Instantly share code, notes, and snippets.

@jecolasurdo
Last active June 11, 2018 05:23
Show Gist options
  • Save jecolasurdo/243ea8dff89685f65dfcccda9f331788 to your computer and use it in GitHub Desktop.
Save jecolasurdo/243ea8dff89685f65dfcccda9f331788 to your computer and use it in GitHub Desktop.
Handy snippets to use when working with ccv2
# remove all files below a generated directory except .gitkeep
find . -type f -regex .*generated/.* -not -regex .*\.gitkeep -delete
# run all unit tests excluding integration tests and only show failures
go test -count=1 -race $(go list ./... | grep integrationtest -v) 2>/dev/null | grep FAIL
# run all unit tests with coverage and list them from highest coverage to lowest
for p in $(go list ./... | grep integrationtest -v); do go test -count=1 -cover -race $p; done | grep \? -v | sort -k 4
# list log group ARNs for CCV2
aws logs describe-log-groups --log-group-name-prefix /aws/lambda/cookiecrumbler-v2 --output text | awk '{print $2}' | uniq | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment