Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Mar 5, 2024
1 parent 6125e70 commit f1ab72e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pkg/crawler/crawler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ func TestCrawl(t *testing.T) {
{
name: "happy path",
fileNames: map[string]string{
"/maven2/": "testdata/index.html",
"/maven2/abbot/": "testdata/abbot.html",
"/maven2/abbot/abbot/": "testdata/abbot_abbot.html",
"/maven2/abbot/abbot/maven-metadata.xml": "testdata/maven-metadata.xml",
"/maven2/abbot/abbot/0.12.3/abbot-0.12.3.jar.sha1": "testdata/abbot-0.12.3.jar.sha1",
"/maven2/abbot/abbot/0.13.0/abbot-0.13.0.jar.sha1": "testdata/abbot-0.13.0.jar.sha1",
"/maven2/abbot/abbot/1.4.0/abbot-1.4.0.jar.sha1": "testdata/abbot-1.4.0.jar.sha1",
"/maven2/": "testdata/index.html",
"/maven2/abbot/": "testdata/abbot.html",
"/maven2/abbot/abbot/": "testdata/abbot_abbot.html",
"/maven2/abbot/abbot/maven-metadata.xml": "testdata/maven-metadata.xml",
"/maven2/abbot/abbot/0.12.3/": "testdata/abbot_abbot_0.12.3.html",
"/maven2/abbot/abbot/0.12.3/abbot-0.12.3.jar.sha1": "testdata/abbot-0.12.3.jar.sha1",
"/maven2/abbot/abbot/0.13.0/": "testdata/abbot_abbot_0.13.0.html",
"/maven2/abbot/abbot/0.13.0/abbot-0.13.0.jar.sha1": "testdata/abbot-0.13.0.jar.sha1",
"/maven2/abbot/abbot/1.4.0/": "testdata/abbot_abbot_1.4.0.html",
"/maven2/abbot/abbot/1.4.0/abbot-1.4.0.jar.sha1": "testdata/abbot-1.4.0.jar.sha1",
"/maven2/abbot/abbot/1.4.0/abbot-1.4.0-sources.jar.sha1": "testdata/abbot-1.4.0-sources.jar.sha1",
},
goldenPath: "testdata/golden/abbot.json",
filePath: "indexes/abbot/abbot.json",
Expand Down
1 change: 1 addition & 0 deletions pkg/crawler/testdata/abbot-1.4.0-sources.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0547ab037068afa2026925bd94bfb9fcfcec9761
4 changes: 4 additions & 0 deletions pkg/crawler/testdata/golden/abbot.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"Version": "0.13.0",
"SHA1": "WW2R5nYxsN6wX7aF2NG2c18+T2A="
},
{
"Version": "1.4.0-sources",
"SHA1": "BUerA3Bor6ICaSW9lL+5/Pzsl2E="
},
{
"Version": "1.4.0",
"SHA1": "ojY2RqndBZVWM7RQAQtZohr4pCM="
Expand Down

0 comments on commit f1ab72e

Please sign in to comment.