View Javadoc
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  
12  import org.eclipse.jgit.transport.UploadPack.RequestValidator;
13  
14  /**
15   * Client may ask for objects that are the tip of any reference, even if not
16   * advertised.
17   */
18  public class TipRequestValidatorTest extends RequestValidatorTestCase {
19  
20  	@Override
21  	protected RequestValidator createValidator() {
22  		return new UploadPack.TipRequestValidator();
23  	}
24  
25  	@Override
26  	protected boolean isReachableCommitValid() {
27  		return false;
28  	}
29  
30  	@Override
31  	protected boolean isUnreachableCommitValid() {
32  		return false;
33  	}
34  
35  	@Override
36  	protected boolean isReachableBlobValid_withBitmaps() {
37  		return false;
38  	}
39  
40  	@Override
41  	protected boolean isReachableBlobValid_withoutBitmaps() {
42  		return false;
43  	}
44  
45  	@Override
46  	protected boolean isUnreachableBlobValid() {
47  		return false;
48  	}
49  
50  	@Override
51  	protected boolean isAdvertisedTipValid() {
52  		return true;
53  	}
54  
55  	@Override
56  	protected boolean isUnadvertisedTipCommitValid() {
57  		return true;
58  	}
59  
60  }