Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the object to be encrypted is a ciphertext, it makes the command an error. #85

Merged
merged 3 commits into from
Oct 30, 2017

Conversation

ieee0824
Copy link
Contributor

issue: #83

If the object to be encrypted is a ciphertext, it makes the command an error.

changes

  • add error
  • add test

About implementation

The already encrypted file has encryption information as meta information.
Specifically, it has the key "encryption_type".
Therefore, those with "encryption_type" are considered to be encrypted.

func alreadyEncryptErrorTestRun(t *testing.T, tester *encrypterTester, tests map[string]testInput) error {
for key, _ := range tests {
err := tester.encrypter.Encrypt("", fmt.Sprintf("%s/%v", tester.COPY_TEST_DIR, key))
if err != nil {

Choose a reason for hiding this comment

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

How about excluding this error handling?
Since test cases is clear, it is considered that no error will occur.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds like a good idea.
Once we make another issue, and I think I will fix it.

#87

@ieee0824 ieee0824 merged commit f73ea77 into master Oct 30, 2017
@ieee0824 ieee0824 deleted the fix-83 branch October 30, 2017 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants