From 539b8762ec8582c1fc974169ff084af557cc0aef Mon Sep 17 00:00:00 2001 From: Maayan Hadasi <60384172+mguetta1@users.noreply.github.com> Date: Thu, 2 May 2024 13:42:18 +0300 Subject: [PATCH] Update README and configuration file (#115) Signed-off-by: Maayan Hadasi --- Makefile | 6 +++++- README.md | 6 +++++- analysis/README.md | 8 +++++++- analysis/test_cases.go | 4 ++-- go-konveyor-tests.config | 18 ++++++++++++++++++ 5 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 go-konveyor-tests.config diff --git a/Makefile b/Makefile index e96b0f9..6911a30 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ VENDOR_DIR ?= /tmp/konveyor-vendor ARCH ?= amd64 JUNIT_REPORT_DIR ?= /tmp/junit-report +# Set MAVEN_TESTAPP_USER to the value of GITHUB_USER if GITHUB_USER is defined +MAVEN_TESTAPP_USER ?= $(GITHUB_USER) +MAVEN_TESTAPP_TOKEN ?= $(GITHUB_TOKEN) + # Setup local minikube with tackle - work in progress (TODO: enable auth) # This is for local setup, CI uses shared github actions @@ -44,7 +48,7 @@ test-tier2: # TIER3 test-tier3: - TIER3=1 MAVEN_TESTAPP_USER=$(GITHUB_USER) MAVEN_TESTAPP_TOKEN=$(GITHUB_TOKEN) $(MAKE) test-analysis + TIER3=1 MAVEN_TESTAPP_USER='$(MAVEN_TESTAPP_USER)' MAVEN_TESTAPP_TOKEN='$(MAVEN_TESTAPP_TOKEN)' $(MAKE) test-analysis $(MAKE) test-jira $(MAKE) test-migrationwave diff --git a/README.md b/README.md index 9012862..0113b36 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,11 @@ For parallel test execution, set `export PARALLEL=1`. ## Configuration > **_NOTE:_** Before running tests, ensure that the required configuration variables are set as environment variables - + +You can edit the configuration file [go-konveyor-tests.config](go-konveyor-tests.config) and run: +``` +source go-konveyor-tests.config +``` ### Test-Specific Configuration diff --git a/analysis/README.md b/analysis/README.md index d76a1bb..9121bac 100644 --- a/analysis/README.md +++ b/analysis/README.md @@ -26,12 +26,18 @@ TIER1=1 make test-analysis More advanced analysis parameters. Great if works. -Test cases: https://github.com/konveyor/go-konveyor-tests/blob/main/analysis/test_cases.go#L20 +Test cases: https://github.com/konveyor/go-konveyor-tests/blob/main/analysis/test_cases.go#L19 ``` TIER2=1 make test-analysis ``` +### Tier 3 + +Application analysis with credentials, which are supplied as part of the test configuration. Should work. + +Test cases: https://github.com/konveyor/go-konveyor-tests/blob/main/analysis/test_cases.go#L31 + ## Options [HUB_BASE_URL](https://github.com/konveyor/tackle2-hub/tree/main/test#rest-api) is required in the same way as in API test. diff --git a/analysis/test_cases.go b/analysis/test_cases.go index a99d5b6..5f2f9d7 100644 --- a/analysis/test_cases.go +++ b/analysis/test_cases.go @@ -25,8 +25,8 @@ var Tier2TestCases = []TC{ SeamBooking, } -// Tier 3 Analysis test cases - should work +// Tier 3 Analysis with credentials test cases - should work // List of applications with expected analysis outputs. var Tier3TestCases = []TC{ - TackleTestappPrivateBinary, + TackleTestappPrivateBinary, // Needs GITHUB_USER and GITHUB_TOKEN env variables with Read access to https://github.com/konveyor/tackle-testapp } diff --git a/go-konveyor-tests.config b/go-konveyor-tests.config new file mode 100644 index 0000000..a37d880 --- /dev/null +++ b/go-konveyor-tests.config @@ -0,0 +1,18 @@ +#!/bin/bash +export KUBECONFIG="" +export HUB_BASE_URL="" +export HUB_PASSWORD="" +export HUB_USERNAME="" + +# Enviroment variebles needed for e2e/jiraintegration and e2e/migrationwave tests +export JIRA_CLOUD_USERNAME="" +export JIRA_CLOUD_PASSWORD="" +export JIRA_CLOUD_URL="" +export JIRA_SERVER_URL="" +export JIRA_SERVER_USERNAME="" +export JIRA_SERVER_PASSWORD="" +export JIRA_SERVER_TOKEN="" + +# Enviroment variebles needed for Tier3 Analysis test +export GITHUB_USER="" +export GITHUB_TOKEN=""