Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub-issue#253 : Implemented download maxmind test mmdb files to re… #3193

Conversation

venkataraopasyavula
Copy link
Contributor

Description

Implemented downlaod maxmind test mmdb files to resource folder

Issues Resolved

GitHub-issue #253

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@@ -25,6 +31,73 @@ dependencies {
testImplementation project(':data-prepper-test-common')
}

task copyGeoLite2Files(type: Copy) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than use a Copy task, you can use a Download task.

See this example:

tasks.create("${downloadJDKTask}", Download, {
src jdkSources.get(platform + '_' + architecture)
dest "${buildDir}/${platform}${architecture}/openjdk/openjdk.tar.gz"
overwrite false
})

The download plugin will help:

id 'de.undercouch.download' version '4.1.2' apply false

into(geoLite2Dir)

doFirst {
// Trust all certificates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to trust all? The GitHub certificate is valid.

For example, a simple download works just fine:

wget https://github.com/maxmind/MaxMind-DB/tree/main/test-data/GeoLite2-City-Test.mmdb

task copyGeoIP2File(type: Copy) {

def urls = [
'https://github.com/maxmind/MaxMind-DB/tree/main/test-data/GeoIP2-Enterprise-Test.mmdb'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is still checked in. Let's remove this too.

@venkataraopasyavula
Copy link
Contributor Author

Raised another PR - 3373 for downloading test mmdb's from maxmind to resources folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants