File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 5858 #".*" )))
5959
6060(def re-path
61- (let [segment #"[^/]+"
61+ (let [segment #"[^/? ]+"
6262 sep #"/+" ]
6363 (re/regex (re/? sep " repo" ) sep
6464 [(re/* segment sep) segment :as :group ] sep
Original file line number Diff line number Diff line change 3434 (is (= " 0.1.0" (:version m)))
3535 (is (= " jar" (:ext m))))))
3636
37+ (def skipped-lines
38+ [" <134>2023-06-04T23:04:45Z cache-bos4631 s3-bucket[170864]: 71.184.230.157 \" GET /?prefix=downloads-&marker=downloads-20230514.edn HTTP/1.1\" 200 4682 (null) Java/17.0.5"
39+ " <134>2023-06-04T23:04:45Z cache-bos4631 s3-bucket[170864]: 71.184.230.157 \" GET /?prefix=/com/foo/bar/1.0/bar.jar HTTP/1.1\" 200 4682 (null) Java/17.0.5" ])
40+
41+ (deftest parse-line-does-not-parse-paths-for-lines-we-do-not-want-stats-for
42+ (doseq [line skipped-lines]
43+ (is (nil? (:group (stats/parse-line line))))))
44+
3745(deftest compute-stats
3846 (let [stats (stats/process-log (io/resource " fake.access.log" ))]
3947 (is (= 2 (get-in stats [[" snowy" " snowy" ] " 0.3.0" ])))
You can’t perform that action at this time.
0 commit comments