diff --git a/analysis/analysis_test.go b/analysis/analysis_test.go index 1dedb21..b50fcb1 100644 --- a/analysis/analysis_test.go +++ b/analysis/analysis_test.go @@ -13,7 +13,6 @@ import ( "time" "github.com/k0kubun/pp" - "github.com/konveyor/go-konveyor-tests/hack/addon" "github.com/konveyor/go-konveyor-tests/hack/uniq" "github.com/konveyor/tackle2-hub/api" "github.com/konveyor/tackle2-hub/binding" @@ -92,7 +91,7 @@ func TestApplicationAnalysis(t *testing.T) { // Prepare and submit the analyze task. // tc.Task.Addon = analyzerAddon tc.Task.Application = &api.Ref{ID: tc.Application.ID} - taskData := tc.Task.Data.(addon.Data) + taskData := AnalyzeDataDefault //for _, r := range tc.CustomRules { // taskData.Rules = append(taskData.Rules, api.Ref{ID: r.ID, Name: r.Name}) //} diff --git a/analysis/analyzer_defaults.go b/analysis/analyzer_defaults.go index 493f4fa..93b0dea 100644 --- a/analysis/analyzer_defaults.go +++ b/analysis/analyzer_defaults.go @@ -7,11 +7,10 @@ import ( var Analyze = api.Task{ State: "Created", // Created / Ready - Data: defaultAnalyzerData, Addon: "analyzer", } -var defaultAnalyzerData = addon.Data{ +var AnalyzeDataDefault = addon.Data{ Output: "/windup/report", Mode: addon.Mode{ Artifact: "", diff --git a/analysis/tc_tackle_testapp_public.go b/analysis/tc_tackle_testapp_public.go index 7732df3..6b83cf7 100644 --- a/analysis/tc_tackle_testapp_public.go +++ b/analysis/tc_tackle_testapp_public.go @@ -36,7 +36,7 @@ var TackleTestappPublic = TC{ Rule: "hardcoded-ip-address", Incidents: []api.Incident{ { - File: "/addon/source/tackle-testapp-public/src/main/resources/persistence.properties", + File: "/shared/source/tackle-testapp-public/src/main/resources/persistence.properties", Line: 2, Message: "When migrating environments, hard-coded IP addresses may need to be modified or eliminated.", CodeSnip: "jdbc.url=jdbc:oracle:thin:@10.19.2.93:15", @@ -51,43 +51,43 @@ var TackleTestappPublic = TC{ Rule: "local-storage-00001", Incidents: []api.Incident{ { - File: "/addon/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", + File: "/shared/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", Line: 45, Message: "An application running inside a container could lose access to a file in local storage.. Recommendations. The following recommendations depend on the function of the file in local storage:. * Logging: Log to standard output and use a centralized log collector to analyze the logs.. * Caching: Use a cache backing service.. * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.. * Data storage: Use a database backing service for relational data or use a persistent data storage system.. * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.", CodeSnip: "dataSource.setDriverClassName(config.getProperty(\"jdbc.driverClassName\"));", }, { - File: "/addon/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", + File: "/shared/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", Line: 46, Message: "An application running inside a container could lose access to a file in local storage.. Recommendations. The following recommendations depend on the function of the file in local storage:. * Logging: Log to standard output and use a centralized log collector to analyze the logs.. * Caching: Use a cache backing service.. * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.. * Data storage: Use a database backing service for relational data or use a persistent data storage system.. * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.", CodeSnip: "dataSource.setUrl(config.getProperty(\"jdbc.url\"));", }, { - File: "/addon/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", + File: "/shared/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", Line: 47, Message: "An application running inside a container could lose access to a file in local storage.. Recommendations. The following recommendations depend on the function of the file in local storage:. * Logging: Log to standard output and use a centralized log collector to analyze the logs.. * Caching: Use a cache backing service.. * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.. * Data storage: Use a database backing service for relational data or use a persistent data storage system.. * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.", CodeSnip: "dataSource.setUsername(config.getProperty(\"jdbc.user\"));", }, { - File: "/addon/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", + File: "/shared/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", Line: 48, Message: "An application running inside a container could lose access to a file in local storage.. Recommendations. The following recommendations depend on the function of the file in local storage:. * Logging: Log to standard output and use a centralized log collector to analyze the logs.. * Caching: Use a cache backing service.. * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.. * Data storage: Use a database backing service for relational data or use a persistent data storage system.. * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.", CodeSnip: "dataSource.setPassword(config.getProperty(\"jdbc.password\"));", }, { - File: "/addon/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", + File: "/shared/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", Line: 56, Message: "An application running inside a container could lose access to a file in local storage.. Recommendations. The following recommendations depend on the function of the file in local storage:. * Logging: Log to standard output and use a centralized log collector to analyze the logs.. * Caching: Use a cache backing service.. * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.. * Data storage: Use a database backing service for relational data or use a persistent data storage system.. * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.", CodeSnip: "transactionManager.setEntityManagerFactory(", }, { - File: "/addon/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", + File: "/shared/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", Line: 68, Message: "An application running inside a container could lose access to a file in local storage.. Recommendations. The following recommendations depend on the function of the file in local storage:. * Logging: Log to standard output and use a centralized log collector to analyze the logs.. * Caching: Use a cache backing service.. * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.. * Data storage: Use a database backing service for relational data or use a persistent data storage system.. * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.", CodeSnip: "hibernateProperties.setProperty(\"hibernate.hbm2ddl.auto\", config.getProperty(\"hibernate.hbm2ddl.auto\"));", }, { - File: "/addon/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", + File: "/shared/source/tackle-testapp-public/src/main/java/io/konveyor/demo/ordermanagement/config/PersistenceConfig.java", Line: 69, Message: "An application running inside a container could lose access to a file in local storage.. Recommendations. The following recommendations depend on the function of the file in local storage:. * Logging: Log to standard output and use a centralized log collector to analyze the logs.. * Caching: Use a cache backing service.. * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.. * Data storage: Use a database backing service for relational data or use a persistent data storage system.. * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.", CodeSnip: "hibernateProperties.setProperty(\"hibernate.dialect\", config.getProperty(\"hibernate.dialect\"));", diff --git a/analysis/tc_tackle_testapp_public_deps.go b/analysis/tc_tackle_testapp_public_deps.go index f540299..678f6f5 100644 --- a/analysis/tc_tackle_testapp_public_deps.go +++ b/analysis/tc_tackle_testapp_public_deps.go @@ -34,7 +34,7 @@ var TackleTestappPublicWithDeps = TC{ Rule: "hardcoded-ip-address", Incidents: []api.Incident{ { - File: "/addon/source/tackle-testapp-public/src/main/resources/persistence.properties", + File: "/shared/source/tackle-testapp-public/src/main/resources/persistence.properties", Line: 2, Message: "When migrating environments, hard-coded IP addresses may need to be modified or eliminated.", CodeSnip: "jdbc.url=jdbc:oracle:thin:@10.19.2.93:15", @@ -49,7 +49,7 @@ var TackleTestappPublicWithDeps = TC{ Rule: "local-storage-00001", Incidents: []api.Incident{ { - File: "/cache/m2/io/konveyor/demo/configuration-utils/1.0.0/io/konveyor/demo/config/ApplicationConfiguration.java", + File: "/root/.m2/repository/io/konveyor/demo/configuration-utils/1.0.0/io/konveyor/demo/config/ApplicationConfiguration.java", Line: 14, Message: "An application running inside a container could lose access to a file in local storage", }, diff --git a/analysis/tc_tackle_testapp_public_package_filter.go b/analysis/tc_tackle_testapp_public_package_filter.go index ed3cb39..875859d 100644 --- a/analysis/tc_tackle_testapp_public_package_filter.go +++ b/analysis/tc_tackle_testapp_public_package_filter.go @@ -44,7 +44,7 @@ var TackleTestappPublicPackageFilter = TC{ Rule: "hardcoded-ip-address", Incidents: []api.Incident{ { - File: "/addon/source/tackle-testapp-public/src/main/resources/persistence.properties", + File: "/shared/source/tackle-testapp-public/src/main/resources/persistence.properties", Line: 2, Message: "When migrating environments, hard-coded IP addresses may need to be modified or eliminated.", CodeSnip: "jdbc.url=jdbc:oracle:thin:@10.19.2.93:15",