@@ -22,21 +22,23 @@ _tests = []
2222def _test_simple (env ):
2323 calls = []
2424
25- def read_simpleapi (ctx , url , attr , cache , get_auth , block ):
25+ def read_simpleapi (ctx , index_url , distribution , attr , cache , get_auth , requested_versions , block ):
2626 _ = ctx # buildifier: disable=unused-variable
27+ _ = distribution
28+ _ = requested_versions
2729 _ = attr
2830 _ = cache
2931 _ = get_auth
3032 env .expect .that_bool (block ).equals (False )
31- calls .append (url )
32- if "foo" in url and "main" in url :
33+ calls .append (index_url )
34+ if "foo" in index_url and "main" in index_url :
3335 return struct (
3436 output = "" ,
3537 success = False ,
3638 )
3739 else :
3840 return struct (
39- output = "data from {}" .format (url ),
41+ output = "data from {}" .format (index_url ),
4042 success = True ,
4143 )
4244
@@ -75,26 +77,28 @@ def _test_fail(env):
7577 calls = []
7678 fails = []
7779
78- def read_simpleapi (ctx , url , attr , cache , get_auth , block ):
80+ def read_simpleapi (ctx , index_url , distribution , attr , cache , get_auth , requested_versions , block ):
7981 _ = ctx # buildifier: disable=unused-variable
82+ _ = distribution
83+ _ = requested_versions
8084 _ = attr
8185 _ = cache
8286 _ = get_auth
8387 env .expect .that_bool (block ).equals (False )
84- calls .append (url )
85- if "foo" in url :
88+ calls .append (index_url )
89+ if "foo" in index_url :
8690 return struct (
8791 output = "" ,
8892 success = False ,
8993 )
90- if "bar" in url :
94+ if "bar" in index_url :
9195 return struct (
9296 output = "" ,
9397 success = False ,
9498 )
9599 else :
96100 return struct (
97- output = "data from {}" .format (url ),
101+ output = "data from {}" .format (index_url ),
98102 success = True ,
99103 )
100104
0 commit comments