From 211f54358f419f5433027e11b487169dea3976b3 Mon Sep 17 00:00:00 2001 From: serenaponta <42769540+serenaponta@users.noreply.github.com> Date: Tue, 25 Jan 2022 14:55:40 +0100 Subject: [PATCH 1/9] removed running flag and pypi from cia config --- docker/kb-importer/conf/kaybeeconf.yaml | 4 ++-- .../src/main/resources/steady-rest-lib-utils.properties | 6 ++++-- .../steady/cia/rest/IT01_ArtifactControllerTest.java | 2 ++ .../eclipse/steady/cia/rest/IT02_SpringControllerTest.java | 3 +++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docker/kb-importer/conf/kaybeeconf.yaml b/docker/kb-importer/conf/kaybeeconf.yaml index 2a7d9b3c1..c07dcfcef 100644 --- a/docker/kb-importer/conf/kaybeeconf.yaml +++ b/docker/kb-importer/conf/kaybeeconf.yaml @@ -4,8 +4,8 @@ apiVersion: "v1" # Ranks: smaller value means higher rank (higher priority) # Do not edit the KB_IMPOTER_* placeholders sources: - - repo: $KB_IMPORTER_STATEMENTS_REPO - branch: $KB_IMPORTER_STATEMENTS_BRANCH + - repo: https://github.com/sap/project-kb + branch: vulnerability-data rank: 10 # Edit this to point to your Eclipse Steady server (optional) diff --git a/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties b/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties index b50c474e4..ba39370a3 100644 --- a/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties +++ b/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties @@ -34,8 +34,10 @@ vulas.lib-utils.mavencentral.retrycount=3 vulas.lib-utils.mavencentral.retrydelay=10000 # End point to query/retrieve artifacts from Pypi -# Default: -vulas.lib-utils.pypi.search=https://pypi.org/pypi/ +# Default: +#https://pypi.org/pypi/ +vulas.lib-utils.pypi.search= + # IMPORTANT diff --git a/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT01_ArtifactControllerTest.java b/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT01_ArtifactControllerTest.java index bebe3333d..120e26411 100644 --- a/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT01_ArtifactControllerTest.java +++ b/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT01_ArtifactControllerTest.java @@ -31,6 +31,7 @@ import org.eclipse.steady.shared.enums.ProgrammingLanguage; import org.eclipse.steady.shared.json.model.Artifact; import org.eclipse.steady.shared.json.model.Version; +import org.junit.Ignore; import org.junit.Test; public class IT01_ArtifactControllerTest { @@ -69,6 +70,7 @@ public void getAllVersionsNotFoundTest() { } } + @Ignore @Test public void getAllVersionsPythonTest() { diff --git a/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT02_SpringControllerTest.java b/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT02_SpringControllerTest.java index f4f0c134c..cdd3455a4 100644 --- a/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT02_SpringControllerTest.java +++ b/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT02_SpringControllerTest.java @@ -35,6 +35,7 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -108,6 +109,7 @@ public void setup() throws Exception { @After public void reset() throws Exception {} + @Ignore @Test public void getAllVersionsTest() throws Exception { @@ -165,6 +167,7 @@ public void getLatestVersionsPackagingFilterTest() throws Exception { // .andExpect(jsonPath("$.libId.version", is("2.9.5"))); } + @Ignore @Test public void getLatestVersionsPackagingFilterPythonTest() throws Exception { final MockHttpServletRequestBuilder get_builder2 = From d7af4d94b5b2efbd1ce896e72f12d4581ca0c915 Mon Sep 17 00:00:00 2001 From: serenaponta <42769540+serenaponta@users.noreply.github.com> Date: Thu, 27 Jan 2022 14:59:20 +0100 Subject: [PATCH 2/9] reverted substitution --- docker/kb-importer/conf/kaybeeconf.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/kb-importer/conf/kaybeeconf.yaml b/docker/kb-importer/conf/kaybeeconf.yaml index c07dcfcef..2a7d9b3c1 100644 --- a/docker/kb-importer/conf/kaybeeconf.yaml +++ b/docker/kb-importer/conf/kaybeeconf.yaml @@ -4,8 +4,8 @@ apiVersion: "v1" # Ranks: smaller value means higher rank (higher priority) # Do not edit the KB_IMPOTER_* placeholders sources: - - repo: https://github.com/sap/project-kb - branch: vulnerability-data + - repo: $KB_IMPORTER_STATEMENTS_REPO + branch: $KB_IMPORTER_STATEMENTS_BRANCH rank: 10 # Edit this to point to your Eclipse Steady server (optional) From f5d6e562e34a57af0010dcef6b99a65024c9a82c Mon Sep 17 00:00:00 2001 From: serenaponta <42769540+serenaponta@users.noreply.github.com> Date: Thu, 27 Jan 2022 15:00:04 +0100 Subject: [PATCH 3/9] actually remove running flag --- docker/kb-importer/kb-importer.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docker/kb-importer/kb-importer.sh b/docker/kb-importer/kb-importer.sh index 4259d7090..f9fe7e1b9 100644 --- a/docker/kb-importer/kb-importer.sh +++ b/docker/kb-importer/kb-importer.sh @@ -21,9 +21,9 @@ construct_kaybee_pull_folder(){ echo ${HOST}_${PATH} } -if [ ! -f /kb-importer/data/running ] -then - touch /kb-importer/data/running +#if [ ! -f /kb-importer/data/running ] +#then +# touch /kb-importer/data/running #kaybee update cd /kb-importer/data @@ -41,7 +41,7 @@ then chmod +x steady.sh ./steady.sh echo `date` " Kaybee Import Done" - rm /kb-importer/data/running -else - echo `date` " Kaybee Import already Running" -fi +# rm /kb-importer/data/running +#else +# echo `date` " Kaybee Import already Running" +#fi From c0f997742a2ba6b6e4a0a293782e34e98f444e47 Mon Sep 17 00:00:00 2001 From: serenaponta <42769540+serenaponta@users.noreply.github.com> Date: Thu, 27 Jan 2022 15:13:40 +0100 Subject: [PATCH 4/9] changed cron config to hour only --- docker/.env.sample | 2 +- docker/kb-importer/start.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docker/.env.sample b/docker/.env.sample index cb2ba3bf4..eaf6010ad 100644 --- a/docker/.env.sample +++ b/docker/.env.sample @@ -34,7 +34,7 @@ https_proxy= no_proxy= # kb-importer update cron expression -KB_IMPORTER_CRON=0 0 * * * +KB_IMPORTER_CRON_HOUR=0 KB_IMPORTER_STATEMENTS_FOLDER=statements KB_IMPORTER_STATEMENTS_REPO=https://github.com/sap/project-kb KB_IMPORTER_STATEMENTS_BRANCH=vulnerability-data diff --git a/docker/kb-importer/start.sh b/docker/kb-importer/start.sh index 970bbe738..7d85039ea 100644 --- a/docker/kb-importer/start.sh +++ b/docker/kb-importer/start.sh @@ -11,7 +11,6 @@ fi #substitute env variables used by kaybee in kaybeeconf.yaml sed "s|KB_IMPORTER_STATEMENTS_REPO|$KB_IMPORTER_STATEMENTS_REPO|g" ../conf/kaybeeconf.yaml.sample > ../conf/kaybeeconf.yaml -sed -i "s|KB_IMPORTER_STATEMENTS_BRANCH|$KB_IMPORTER_STATEMENTS_BRANCH|g" ../conf/kaybeeconf.yaml echo "Statements repo: " $KB_IMPORTER_STATEMENTS_REPO echo "Statements branch: " $KB_IMPORTER_STATEMENTS_BRANCH @@ -37,11 +36,11 @@ sleep 40 crontab -l > tmpcron if ! cat tmpcron | grep "kb-importer.sh" then - if [ -z "$KB_IMPORTER_CRON" ] + if [ -z "$KB_IMPORTER_CRON_HOUR" ] then echo "0 0 * * * PATH=$PATH BACKEND_SERVICE_URL=$BACKEND_SERVICE_URL KB_IMPORTER_STATEMENTS_FOLDER=$KB_IMPORTER_STATEMENTS_FOLDER KB_IMPORTER_STATEMENTS_BRANCH=$KB_IMPORTER_STATEMENTS_BRANCH KB_IMPORTER_STATEMENTS_REPO=$KB_IMPORTER_STATEMENTS_REPO KB_IMPORTER_CLONE_FOLDER=$KB_IMPORTER_CLONE_FOLDER KB_IMPORTER_SKIP_CLONE=$KB_IMPORTER_SKIP_CLONE /kb-importer/kb-importer.sh >> /kb-importer/cron.log 2>&1" >> tmpcron else - echo "$KB_IMPORTER_CRON" " PATH=$PATH BACKEND_SERVICE_URL=$BACKEND_SERVICE_URL KB_IMPORTER_STATEMENTS_FOLDER=$KB_IMPORTER_STATEMENTS_FOLDER KB_IMPORTER_STATEMENTS_BRANCH=$KB_IMPORTER_STATEMENTS_BRANCH KB_IMPORTER_STATEMENTS_REPO=$KB_IMPORTER_STATEMENTS_REPO KB_IMPORTER_CLONE_FOLDER=$KB_IMPORTER_CLONE_FOLDER KB_IMPORTER_SKIP_CLONE=$KB_IMPORTER_SKIP_CLONE /kb-importer/kb-importer.sh >> /kb-importer/cron.log 2>&1" >> tmpcron + echo "0 " "$KB_IMPORTER_CRON_HOUR" " * * * PATH=$PATH BACKEND_SERVICE_URL=$BACKEND_SERVICE_URL KB_IMPORTER_STATEMENTS_FOLDER=$KB_IMPORTER_STATEMENTS_FOLDER KB_IMPORTER_STATEMENTS_BRANCH=$KB_IMPORTER_STATEMENTS_BRANCH KB_IMPORTER_STATEMENTS_REPO=$KB_IMPORTER_STATEMENTS_REPO KB_IMPORTER_CLONE_FOLDER=$KB_IMPORTER_CLONE_FOLDER KB_IMPORTER_SKIP_CLONE=$KB_IMPORTER_SKIP_CLONE /kb-importer/kb-importer.sh >> /kb-importer/cron.log 2>&1" >> tmpcron fi fi crontab tmpcron From 7b8ea7c0361a7d7bdf219d66aa77971bdf7bbfdc Mon Sep 17 00:00:00 2001 From: serenaponta <42769540+serenaponta@users.noreply.github.com> Date: Thu, 27 Jan 2022 15:16:47 +0100 Subject: [PATCH 5/9] remove backward compatible file --- docker/kb-importer/conf/kaybeeconf.yaml | 254 ------------------------ 1 file changed, 254 deletions(-) delete mode 100644 docker/kb-importer/conf/kaybeeconf.yaml diff --git a/docker/kb-importer/conf/kaybeeconf.yaml b/docker/kb-importer/conf/kaybeeconf.yaml deleted file mode 100644 index 2a7d9b3c1..000000000 --- a/docker/kb-importer/conf/kaybeeconf.yaml +++ /dev/null @@ -1,254 +0,0 @@ -apiVersion: "v1" - -# List of sources from which statements are pulled -# Ranks: smaller value means higher rank (higher priority) -# Do not edit the KB_IMPOTER_* placeholders -sources: - - repo: $KB_IMPORTER_STATEMENTS_REPO - branch: $KB_IMPORTER_STATEMENTS_BRANCH - rank: 10 - -# Edit this to point to your Eclipse Steady server (optional) -backend: "https://your.steady.server.here/backend" - -policies: - - strict -# - soft - -#exportdenylist: -# # SVN -# - COLLECTIONS-580 -# - CVE-2005-3164 -# - CVE-2005-4838 -# - CVE-2007-0450 - -export: - # - target: csv - # filename: vulnerabilities.csv - # pre: - # each: | - # {{ if .Fixes }} {{ .VulnerabilityID}},{{ (index (index .Fixes 0).Commits 0).RepositoryURL }}{{end}} - # post: - - target: steady - filename: steady.sh - pre: | - #!/bin/bash - - # ------------------------------------------------ - # Import script for Eclipse Steady - # ------------------------------------------------ - - ##-------- E D I T T H I S S E C T I O N -------- - ## - ## COMMENT OUT THE NEXT LINE AND EDIT THE FOLLOWING LINES - #echo "Please configure the necessary variables in the script and try again" && exit 1 - - # Your user token (required to upload vulnerability data to Steady backend) - USER_TOKEN=$BACKEND_BUGS_TOKEN - - # Backend URL of your Steady instance - BACKEND_URL=$BACKEND_SERVICE_URL - - # URL of the CIA service of your Steady instance - CIA_URL=$CIA_SERVICE_URL - - # This must be the absolute path to the kb-importer jar file - KB_IMPORTER_PATH="/kb-importer/data/kb-importer.jar" - - # Skip repos clone and thus vulnerabilities requiring it - SKIP_CLONE=$KB_IMPORTER_SKIP_CLONE - ##---------------------- E N D -------------------- - - ANALYZER_CMD="java -Dvulas.shared.backend.header.X-Vulas-Client-Token=$USER_TOKEN -Dvulas.shared.cia.serviceUrl=$CIA_URL -Dvulas.shared.backend.serviceUrl=$BACKEND_URL -jar $KB_IMPORTER_PATH -u" - LOCAL_CLONES_DIR=$KB_IMPORTER_CLONE_FOLDER - - folder_for_repo(){ - X=$1 - - # remove trailing slash - X=${X%/} - - # remove everything until '://' is matched - X=${X#*:\/\/} - - # replace _ for . - X=${X//./_} - - # replace _ for / - X=${X//\//_} - echo ${LOCAL_CLONES_DIR}/$X - } - - clone_once(){ - DIR=$(folder_for_repo $1) - - if [ -d $DIR ]; - then - echo "Folder $DIR exists, skipping git clone" - else - echo "Cloning $1 to folder $DIR" - git clone $1 $DIR - fi - } - - #make_vuln_metadata(){ - # vulnerability_id="$1" - # description="$2" - # links="$3" - # - # [ -d $vulnerability_id ] || mkdir ./$vulnerability_id - # > $vulnerability_id/meta.properties - # echo "vulnerability_id=$vulnerability_id" >> $vulnerability_id/meta.properties - # echo "description=$description" >> $vulnerability_id/meta.properties - # echo "links=$links" >> $vulnerability_id/meta.properties - #} - - create_meta_from_tar(){ - repo_url=$1 - commit_id=$2 - branch=$3 - vulnerability_id=$4 - source_path=$5 - - if [ -f $vulnerability_id/$commit_id/metadata.json ] - then - return - fi - - [ -d $vulnerability_id/$commit_id ] || mkdir -p $vulnerability_id/$commit_id - if [ -f $source_path/changed-source-code.tar.gz ] - then - timestamp=`cat $vulnerability_id/$commit_id/timestamp` - echo "{" > $vulnerability_id/$commit_id/metadata.json - echo " \"repository\" : \"$repo_url\"," >> $vulnerability_id/$commit_id/metadata.json - echo " \"branch\" : \"$branch\"," >> $vulnerability_id/$commit_id/metadata.json - echo " \"timestamp\" : \"$timestamp\"," >> $vulnerability_id/$commit_id/metadata.json - echo " \"commit_id\" : \"$commit_id\"" >> $vulnerability_id/$commit_id/metadata.json - echo "}" >> $vulnerability_id/$commit_id/metadata.json - rm $vulnerability_id/$commit_id/timestamp - fi - return - } - - clone_and_create_meta(){ - repo_url=$1 - commit_id=$2 - branch=$3 - vulnerability_id=$4 - source_path=$5 - - if [ -f $vulnerability_id/$commit_id/metadata.json ] - then - return - fi - - clone_once $repo_url - repo_dir=$(folder_for_repo $repo_url) - - timestamp=$(git -C $repo_dir show --no-patch --no-notes --pretty='%at' $commit_id) - - echo "{" > $vulnerability_id/$commit_id/metadata.json - echo " \"repository\" : \"$repo_url\"," >> $vulnerability_id/$commit_id/metadata.json - echo " \"branch\" : \"$branch\"," >> $vulnerability_id/$commit_id/metadata.json - echo " \"timestamp\" : \"$timestamp\"," >> $vulnerability_id/$commit_id/metadata.json - echo " \"commit_id\" : \"$commit_id\"" >> $vulnerability_id/$commit_id/metadata.json - echo "}" >> $vulnerability_id/$commit_id/metadata.json - - echo "dir=$repo_dir" - echo "pwd=`pwd`" - - # cd repository - for F in $(git -C $repo_dir diff --name-only $commit_id^..$commit_id); - do - - echo "repo_dir=$repo_dir" - echo "pwd=`pwd`" - - echo "Extracting file: $F" - [ -d $vulnerability_id/$commit_id/before/$(dirname $F) ] || mkdir -p $vulnerability_id/$commit_id/before/$(dirname $F) - [ -d $vulnerability_id/$commit_id/after/$(dirname $F) ] || mkdir -p $vulnerability_id/$commit_id/after/$(dirname $F) - - if ( git -C $repo_dir cat-file -e $commit_id~1:$F &> /dev/null ) - then - git -C $repo_dir show $commit_id~1:$F > $vulnerability_id/$commit_id/before/$F - fi - - if ( git -C $repo_dir cat-file -e $commit_id:$F &> /dev/null ) - then - git -C $repo_dir show $commit_id:$F > $vulnerability_id/$commit_id/after/$F - fi - done - } - - each: |+ - # ----------------------------------------------- - # Analyzing vulnerability {{ .VulnerabilityID}} - # ----------------------------------------------- - {{ if .VulnerabilityID }} - [ -d ./{{ .VulnerabilityID }} ] || mkdir ./{{ .VulnerabilityID }} - {{ $source_path := .Metadata.LocalPath }} - [ -f {{ $source_path }}/changed-source-code.tar.gz ] && tar -xf {{ $source_path }}/changed-source-code.tar.gz -C ./{{ .VulnerabilityID }} - - cat << 'EOM' > ./{{ .VulnerabilityID }}/metadata.json - {{ .ToJSON }} - EOM - - if [ -f {{ $source_path }}/changed-source-code.tar.gz ] ; - then - # Create the metadata from the tarball cloned previously - {{ if .Fixes}}{{ $description := or ((index .Notes 0).Text) "" }} - {{ $vuln := .VulnerabilityID}}{{ $repo := (index (index .Fixes 0).Commits 0).RepositoryURL }} - {{ range $f := .Fixes }}{{ range .Commits }}create_meta_from_tar {{$repo}} {{.ID}} {{$f.ID}} {{ $vuln }} {{ $source_path }} - {{end}}{{end}} - {{end}} - $ANALYZER_CMD -d ./{{ .VulnerabilityID }} - : - else - if [ ! "${KB_IMPORTER_SKIP_CLONE}" == "True" ]; - then - # Create the metadata after cloning the repo of the affected package and checking out every commit - {{ if .Fixes}}{{ $description := or ((index .Notes 0).Text) "" }} - #make_vuln_metadata {{ .VulnerabilityID }} '{{ JoinNotes . }}' {{ LinksAsCSV . }} - {{ $vuln := .VulnerabilityID}}{{ $repo := (index (index .Fixes 0).Commits 0).RepositoryURL }} - {{ range $f := .Fixes }}{{ range .Commits }}clone_and_create_meta {{$repo}} {{.ID}} {{$f.ID}} {{ $vuln }} {{ $source_path }} - {{end}}{{end}} - {{else}} - # This vulnerability has no fix-commits - : - {{end}} - $ANALYZER_CMD -d ./{{ .VulnerabilityID }} - fi - fi - {{end}} - - post: |- - # ------------------------------------------------ - # This script was generated with KayBee - # ------------------------------------------------ - - target: xml - filename: vulnerabilities.xml - pre: | - - - - each: | - - - {{range .Fixes }} - - {{range .Commits }} - {{end}} - - {{end}} - - {{range .Notes }} - - {{range $link := .Links }} - {{end}} - {{ if .Text }}{{ .Text }}{{ end }} - {{end}} - - - post: | - - From 98e24daafa7065fe2066e47ce0c3b9e022455471 Mon Sep 17 00:00:00 2001 From: serenaponta <42769540+serenaponta@users.noreply.github.com> Date: Thu, 27 Jan 2022 16:44:42 +0100 Subject: [PATCH 6/9] readd needed substitution --- docker/kb-importer/start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/kb-importer/start.sh b/docker/kb-importer/start.sh index 7d85039ea..775bc4b21 100644 --- a/docker/kb-importer/start.sh +++ b/docker/kb-importer/start.sh @@ -11,6 +11,7 @@ fi #substitute env variables used by kaybee in kaybeeconf.yaml sed "s|KB_IMPORTER_STATEMENTS_REPO|$KB_IMPORTER_STATEMENTS_REPO|g" ../conf/kaybeeconf.yaml.sample > ../conf/kaybeeconf.yaml +sed -i "s|KB_IMPORTER_STATEMENTS_BRANCH|$KB_IMPORTER_STATEMENTS_BRANCH|g" ../conf/kaybeeconf.yaml echo "Statements repo: " $KB_IMPORTER_STATEMENTS_REPO echo "Statements branch: " $KB_IMPORTER_STATEMENTS_BRANCH From 25434b9e94d213ac23e35bbfe7c435809f036235 Mon Sep 17 00:00:00 2001 From: serenaponta <42769540+serenaponta@users.noreply.github.com> Date: Thu, 27 Jan 2022 18:09:56 +0100 Subject: [PATCH 7/9] removed PypiWrapper from rest-lib-utils SPI --- .../services/org.eclipse.steady.cia.util.RepositoryWrapper | 2 +- .../src/main/resources/steady-rest-lib-utils.properties | 2 +- .../eclipse/steady/cia/rest/IT01_ArtifactControllerTest.java | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rest-lib-utils/src/main/resources/META-INF/services/org.eclipse.steady.cia.util.RepositoryWrapper b/rest-lib-utils/src/main/resources/META-INF/services/org.eclipse.steady.cia.util.RepositoryWrapper index 90939b856..d5cfdbe79 100644 --- a/rest-lib-utils/src/main/resources/META-INF/services/org.eclipse.steady.cia.util.RepositoryWrapper +++ b/rest-lib-utils/src/main/resources/META-INF/services/org.eclipse.steady.cia.util.RepositoryWrapper @@ -1,3 +1,3 @@ org.eclipse.steady.cia.util.MavenCentralWrapper org.eclipse.steady.cia.util.NexusWrapper -org.eclipse.steady.cia.util.PypiWrapper +#org.eclipse.steady.cia.util.PypiWrapper diff --git a/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties b/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties index ba39370a3..c419ac2d0 100644 --- a/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties +++ b/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties @@ -36,7 +36,7 @@ vulas.lib-utils.mavencentral.retrydelay=10000 # End point to query/retrieve artifacts from Pypi # Default: #https://pypi.org/pypi/ -vulas.lib-utils.pypi.search= +vulas.lib-utils.pypi.search=https://pypi.org/pypi/ diff --git a/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT01_ArtifactControllerTest.java b/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT01_ArtifactControllerTest.java index 120e26411..bebe3333d 100644 --- a/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT01_ArtifactControllerTest.java +++ b/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT01_ArtifactControllerTest.java @@ -31,7 +31,6 @@ import org.eclipse.steady.shared.enums.ProgrammingLanguage; import org.eclipse.steady.shared.json.model.Artifact; import org.eclipse.steady.shared.json.model.Version; -import org.junit.Ignore; import org.junit.Test; public class IT01_ArtifactControllerTest { @@ -70,7 +69,6 @@ public void getAllVersionsNotFoundTest() { } } - @Ignore @Test public void getAllVersionsPythonTest() { From abe938b122efb2c6159ad9c6ec5d6c02b2d3f6ab Mon Sep 17 00:00:00 2001 From: serenaponta <42769540+serenaponta@users.noreply.github.com> Date: Thu, 27 Jan 2022 21:01:10 +0100 Subject: [PATCH 8/9] keep python in cia tests --- .../src/main/resources/steady-rest-lib-utils.properties | 1 - .../org/eclipse/steady/cia/rest/IT02_SpringControllerTest.java | 3 --- .../services/org.eclipse.steady.cia.util.RepositoryWrapper | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 rest-lib-utils/src/test/resources/META-INF/services/org.eclipse.steady.cia.util.RepositoryWrapper diff --git a/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties b/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties index c419ac2d0..538c5d072 100644 --- a/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties +++ b/rest-lib-utils/src/main/resources/steady-rest-lib-utils.properties @@ -35,7 +35,6 @@ vulas.lib-utils.mavencentral.retrydelay=10000 # End point to query/retrieve artifacts from Pypi # Default: -#https://pypi.org/pypi/ vulas.lib-utils.pypi.search=https://pypi.org/pypi/ diff --git a/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT02_SpringControllerTest.java b/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT02_SpringControllerTest.java index cdd3455a4..f4f0c134c 100644 --- a/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT02_SpringControllerTest.java +++ b/rest-lib-utils/src/test/java/org/eclipse/steady/cia/rest/IT02_SpringControllerTest.java @@ -35,7 +35,6 @@ import org.junit.After; import org.junit.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -109,7 +108,6 @@ public void setup() throws Exception { @After public void reset() throws Exception {} - @Ignore @Test public void getAllVersionsTest() throws Exception { @@ -167,7 +165,6 @@ public void getLatestVersionsPackagingFilterTest() throws Exception { // .andExpect(jsonPath("$.libId.version", is("2.9.5"))); } - @Ignore @Test public void getLatestVersionsPackagingFilterPythonTest() throws Exception { final MockHttpServletRequestBuilder get_builder2 = diff --git a/rest-lib-utils/src/test/resources/META-INF/services/org.eclipse.steady.cia.util.RepositoryWrapper b/rest-lib-utils/src/test/resources/META-INF/services/org.eclipse.steady.cia.util.RepositoryWrapper new file mode 100644 index 000000000..90939b856 --- /dev/null +++ b/rest-lib-utils/src/test/resources/META-INF/services/org.eclipse.steady.cia.util.RepositoryWrapper @@ -0,0 +1,3 @@ +org.eclipse.steady.cia.util.MavenCentralWrapper +org.eclipse.steady.cia.util.NexusWrapper +org.eclipse.steady.cia.util.PypiWrapper From 1a85efd144f02237e38867a8a467df93b39e80f2 Mon Sep 17 00:00:00 2001 From: serenaponta <42769540+serenaponta@users.noreply.github.com> Date: Fri, 28 Jan 2022 17:06:50 +0100 Subject: [PATCH 9/9] updated setup-steady --- docker/setup-steady.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/setup-steady.sh b/docker/setup-steady.sh index ab69e6cf3..c89ba9091 100755 --- a/docker/setup-steady.sh +++ b/docker/setup-steady.sh @@ -64,7 +64,6 @@ setup (){ curl -s https://raw.githubusercontent.com/eclipse/steady/$TAG/docker/postgresql/docker-entrypoint-initdb.d/10-vulas-setup.sh -o ./$DIR/conf/postgresql/10-vulas-setup.sh curl -s https://raw.githubusercontent.com/eclipse/steady/$TAG/docker/cache/nginx.conf -o ./$DIR/conf/cache/nginx.conf curl -s https://raw.githubusercontent.com/eclipse/steady/$TAG/docker/kb-importer/conf/kaybeeconf.yaml.sample -o ./$DIR/conf/kb-importer/kaybeeconf.yaml.sample - curl -s https://raw.githubusercontent.com/eclipse/steady/$TAG/docker/kb-importer/conf/kaybeeconf.yaml -o ./$DIR/conf/kb-importer/kaybeeconf.yaml curl -s https://raw.githubusercontent.com/eclipse/steady/$TAG/docker/rest-backend/conf/restbackend.properties -o ./$DIR/conf/rest-backend/restbackend.properties # Create default configuration in user's home directory