Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .circleci/rolling-shutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
path: ~/src
- restore_cache:
keys:
- rs-generate-v18-{{ checksum "go.sum" }}-{{checksum "go.mod"}}
- rs-generate-v19-{{ checksum "go.sum" }}-{{checksum "go.mod"}}
- install-asdf
- run:
name: "Install asdf plugins"
Expand All @@ -33,7 +33,7 @@ jobs:
find ./docs -name '*.md' -delete
- run: make generate
- save_cache:
key: rs-generate-v18-{{ checksum "go.sum" }}-{{checksum "go.mod"}}
key: rs-generate-v19-{{ checksum "go.sum" }}-{{checksum "go.mod"}}
paths:
- "~/go/pkg/mod"
- "~/.cache/go-build"
Expand All @@ -51,10 +51,10 @@ jobs:
path: ~/src
- restore_cache:
keys:
- go-mod-v7-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
- go-mod-v8-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
- run: go get -d ./...
- save_cache:
key: go-mod-v7-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
key: go-mod-v8-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
paths:
- ~/go/pkg/
- restore_cache:
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
- store_test_results:
path: report
- save_cache:
key: rs-build-<< parameters.go-version >>-v4-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
key: rs-build-<< parameters.go-version >>-v5-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
paths:
- "~/.cache/go-build"

Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- run: |
make lint-changes
- save_cache:
key: rs-lint-v13-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
key: rs-lint-v14-{{ checksum "go.sum" }}-{{ checksum "go.mod" }}
paths:
- "~/.cache/go-build"
- "~/.cache/golangci-lint"
Expand Down
6 changes: 5 additions & 1 deletion rolling-shutter/cmd/cryptocmd/cryptocmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,23 @@ var (
epochIDFlag string
sigmaFlag string
threshold uint64
filename string
)

func Cmd() *cobra.Command {
cmd := &cobra.Command{
Use: "crypto",
Short: "CLI tool to access crypto functions",
Long: `This command provides utility functions to manually encrypt messages with an eon
key, decrypt them with a decryption key, and check that a decryption key is correct.`,
key, decrypt them with a decryption key, and check that a decryption key is correct. It also hosts
a tool to generate and run crypto tests in a JSON formatted collection.`,
}
cmd.AddCommand(encryptCmd())
cmd.AddCommand(decryptCmd())
cmd.AddCommand(verifyKeyCmd())
cmd.AddCommand(aggregateCmd())
cmd.AddCommand(GenerateTestdata())
cmd.AddCommand(RunJSONTests())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this shouldn't be a command, but rather a normal test that can be run with go test. It could get the test file from a path from an environment variable. This would avoid the unusual signature of the ReadTestCases (that panics on read errors and returns multiple error values) and it would be easier to run them in CI.

This is probably something we would want to change in a future PR though, just so that we can get the test generator out quicker.

return cmd
}

Expand Down
Loading