diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2020-12-04 14:24:51 +0300 |
---|---|---|
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2020-12-08 12:05:04 +0300 |
commit | 7230d8768e3f711e69d39c17482402f05befece6 (patch) | |
tree | 6c9bf1dd092a2a418f282c232cfbf3cfe0bbe45c | |
parent | afc90e3c27b30535e7037765d2ffa2cae68e750b (diff) |
UserCreateTag tests: add a test for empty starting point
The error case of an empty starting point needs to be handled
explicitly in the code, as shown by the different GRPC error code
v.s. a non-existing one, but there was no test for it.
-rw-r--r-- | internal/gitaly/service/operations/tags_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/gitaly/service/operations/tags_test.go b/internal/gitaly/service/operations/tags_test.go index 3e420c0d5..bd764f889 100644 --- a/internal/gitaly/service/operations/tags_test.go +++ b/internal/gitaly/service/operations/tags_test.go @@ -560,6 +560,13 @@ func TestFailedUserCreateTagRequestDueToValidation(t *testing.T) { code: codes.InvalidArgument, }, { + desc: "empty starting point", + tagName: "new-tag", + targetRevision: "", + user: testhelper.TestUser, + code: codes.InvalidArgument, + }, + { desc: "non-existing starting point", tagName: "new-tag", targetRevision: "i-dont-exist", |