You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TipRequestValidatorTest.java 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (C) 2019, Google LLC. and others
  3. *
  4. * This program and the accompanying materials are made available under the
  5. * terms of the Eclipse Distribution License v. 1.0 which is available at
  6. * https://www.eclipse.org/org/documents/edl-v10.php.
  7. *
  8. * SPDX-License-Identifier: BSD-3-Clause
  9. */
  10. package org.eclipse.jgit.transport;
  11. import org.eclipse.jgit.transport.UploadPack.RequestValidator;
  12. /**
  13. * Client may ask for objects that are the tip of any reference, even if not
  14. * advertised.
  15. */
  16. public class TipRequestValidatorTest extends RequestValidatorTestCase {
  17. @Override
  18. protected RequestValidator createValidator() {
  19. return new UploadPack.TipRequestValidator();
  20. }
  21. @Override
  22. protected boolean isReachableCommitValid() {
  23. return false;
  24. }
  25. @Override
  26. protected boolean isUnreachableCommitValid() {
  27. return false;
  28. }
  29. @Override
  30. protected boolean isReachableBlobValid_withBitmaps() {
  31. return false;
  32. }
  33. @Override
  34. protected boolean isReachableBlobValid_withoutBitmaps() {
  35. return false;
  36. }
  37. @Override
  38. protected boolean isUnreachableBlobValid() {
  39. return false;
  40. }
  41. @Override
  42. protected boolean isAdvertisedTipValid() {
  43. return true;
  44. }
  45. @Override
  46. protected boolean isUnadvertisedTipCommitValid() {
  47. return true;
  48. }
  49. }