Instead of relying on mocks, provide mostly-featureful fakes that allow inspection of the structured data passed to them. The fake methods other than path getters are not really used yet. These classes are largely copied from the Gitiles project at 4434b800; the entirety of the copied code was authored by Google employees at Google, so it is safe to include in this project. Change-Id: I57af5d32cfabda6498744382100b4781e4f23d49
		
			
				
	
	
		
			78 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
SRCS = glob(
 | 
						|
  ['src/main/java/**/*.java'],
 | 
						|
)
 | 
						|
RESOURCES = glob(['src/main/resources/**/*'])
 | 
						|
 | 
						|
java_library(
 | 
						|
  name = 'httpd',
 | 
						|
  srcs = SRCS,
 | 
						|
  resources = RESOURCES,
 | 
						|
  deps = [
 | 
						|
    '//gerrit-antlr:query_exception',
 | 
						|
    '//gerrit-common:annotations',
 | 
						|
    '//gerrit-common:server',
 | 
						|
    '//gerrit-extension-api:api',
 | 
						|
    '//gerrit-gwtexpui:linker_server',
 | 
						|
    '//gerrit-gwtexpui:server',
 | 
						|
    '//gerrit-launcher:launcher',
 | 
						|
    '//gerrit-patch-jgit:server',
 | 
						|
    '//gerrit-prettify:server',
 | 
						|
    '//gerrit-reviewdb:server',
 | 
						|
    '//gerrit-server:server',
 | 
						|
    '//gerrit-util-cli:cli',
 | 
						|
    '//gerrit-util-http:http',
 | 
						|
    '//lib:args4j',
 | 
						|
    '//lib:gson',
 | 
						|
    '//lib:guava',
 | 
						|
    '//lib:gwtjsonrpc',
 | 
						|
    '//lib:gwtorm',
 | 
						|
    '//lib:jsch',
 | 
						|
    '//lib:mime-util',
 | 
						|
    '//lib/auto:auto-value',
 | 
						|
    '//lib/commons:codec',
 | 
						|
    '//lib/guice:guice',
 | 
						|
    '//lib/guice:guice-assistedinject',
 | 
						|
    '//lib/guice:guice-servlet',
 | 
						|
    '//lib/jgit:jgit',
 | 
						|
    '//lib/jgit:jgit-servlet',
 | 
						|
    '//lib/log:api',
 | 
						|
    '//lib/lucene:core-and-backward-codecs',
 | 
						|
  ],
 | 
						|
  provided_deps = ['//lib:servlet-api-3_1'],
 | 
						|
  visibility = ['PUBLIC'],
 | 
						|
)
 | 
						|
 | 
						|
java_sources(
 | 
						|
  name = 'httpd-src',
 | 
						|
  srcs = SRCS + RESOURCES,
 | 
						|
  visibility = ['PUBLIC'],
 | 
						|
)
 | 
						|
 | 
						|
java_test(
 | 
						|
  name = 'httpd_tests',
 | 
						|
  srcs = glob(['src/test/java/**/*.java']),
 | 
						|
  deps = [
 | 
						|
    ':httpd',
 | 
						|
    '//gerrit-common:server',
 | 
						|
    '//gerrit-extension-api:api',
 | 
						|
    '//gerrit-reviewdb:server',
 | 
						|
    '//gerrit-server:server',
 | 
						|
    '//gerrit-util-http:http',
 | 
						|
    '//gerrit-util-http:testutil',
 | 
						|
    '//lib:junit',
 | 
						|
    '//lib:gson',
 | 
						|
    '//lib:gwtorm',
 | 
						|
    '//lib:guava',
 | 
						|
    '//lib:servlet-api-3_1',
 | 
						|
    '//lib:truth',
 | 
						|
    '//lib/easymock:easymock',
 | 
						|
    '//lib/guice:guice',
 | 
						|
    '//lib/guice:guice-servlet',
 | 
						|
    '//lib/jgit:jgit',
 | 
						|
    '//lib/jgit:junit',
 | 
						|
  ],
 | 
						|
  source_under_test = [':httpd'],
 | 
						|
  # TODO(sop) Remove after Buck supports Eclipse
 | 
						|
  visibility = ['//tools/eclipse:classpath'],
 | 
						|
)
 |