Skip to content

Commit

Permalink
add missing unit test for kopia hashing algo (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-pampattiwar authored and sseago committed Aug 22, 2024
1 parent fef5b37 commit 81ccae9
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,22 @@ func TestSetupNewRepoAlgorithms(t *testing.T) {
},
},
},
{
name: "hash in StoreOptionGenHashAlgo and invalid in env, StoreOptionGenHashAlgo takes precedence",
envVars: map[string]string{"KOPIA_HASHING_ALGORITHM": "INVALID"},
flags: map[string]string{
udmrepo.StoreOptionGenHashAlgo: "HMAC-SHA3-256",
},
expected: repo.NewRepositoryOptions{
BlockFormat: format.ContentFormat{
Hash: "HMAC-SHA3-256",
Encryption: encryption.DefaultAlgorithm,
},
ObjectFormat: format.ObjectFormat{
Splitter: splitter.DefaultAlgorithm,
},
},
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 81ccae9

Please sign in to comment.