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

Remove SKIPPED_TESTS.yaml file #7747

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/integration_test/build/buildspecs/build-eks-a-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ artifacts:
files:
- "bin/**/*"
- "cmd/integration_test/build/**/*"
- "test/e2e/SKIPPED_TESTS.yaml"
- "ATTRIBUTION.txt"
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ phases:
if [ -f ./bin/local-bundle-release.yaml ]; then
BUNDLES_OVERRIDE=true
fi
- SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml)
- mv bin/cloudstack/e2e.test bin/e2e.test
- >
./bin/test e2e run
Expand All @@ -103,7 +102,6 @@ phases:
-p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT}
-r 'Test'
-v 4
--skip ${SKIPPED_TESTS}
--bundles-override=${BUNDLES_OVERRIDE}
--cleanup-vms=true
--test-report-folder=reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ phases:
if [ -f ./bin/local-bundle-release.yaml ]; then
BUNDLES_OVERRIDE=true
fi
- SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml)
- >
./bin/test e2e run
-c ${INTEGRATION_TEST_INFRA_CONFIG}
Expand All @@ -149,7 +148,6 @@ phases:
-p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT}
-r 'Test'
-v 4
--skip ${SKIPPED_TESTS}
--bundles-override=${BUNDLES_OVERRIDE}
--cleanup-vms=true
--test-report-folder=reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ phases:
if [ -f ./bin/local-bundle-release.yaml ]; then
BUNDLES_OVERRIDE=true
fi
- SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml)
- mv bin/docker/e2e.test bin/e2e.test
- >
./bin/test e2e run
Expand All @@ -55,7 +54,6 @@ phases:
-p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT}
-r 'Test'
-v 4
--skip ${SKIPPED_TESTS}
--bundles-override=${BUNDLES_OVERRIDE}
--test-report-folder=reports
--branch-name=${BRANCH_NAME}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ phases:
if [ -f ./bin/local-bundle-release.yaml ]; then
BUNDLES_OVERRIDE=true
fi
- SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml)
- mv bin/nutanix/e2e.test bin/e2e.test
- >
./bin/test e2e run
Expand All @@ -79,7 +78,6 @@ phases:
-p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT}
-r 'Test'
-v 4
--skip ${SKIPPED_TESTS}
--bundles-override=${BUNDLES_OVERRIDE}
--cleanup-vms=true
--test-report-folder=reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ phases:
if [ -f ./bin/local-bundle-release.yaml ]; then
BUNDLES_OVERRIDE=true
fi
- SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml)
- |
if [ -z "$TESTS" ] || [ "$TESTS" == "QUICK" ]; then
TESTS=$(yq e '.quick_tests | join("|")' ./test/e2e/QUICK_TESTS.yaml)
Expand All @@ -198,7 +197,6 @@ phases:
-p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT}
-r ${TESTS}
-v 4
--skip ${SKIPPED_TESTS}
--bundles-override=${BUNDLES_OVERRIDE}
--cleanup-vms=true
--test-report-folder=reports
Expand Down
2 changes: 0 additions & 2 deletions cmd/integration_test/build/buildspecs/snow-test-eks-a-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ phases:
if [ -f ./bin/local-bundle-release.yaml ]; then
BUNDLES_OVERRIDE=true
fi
- SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml)
- mv bin/snow/e2e.test bin/e2e.test
- >
./bin/test e2e run
Expand All @@ -55,7 +54,6 @@ phases:
-p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT}
-r 'Test'
-v 4
--skip ${SKIPPED_TESTS}
--bundles-override=${BUNDLES_OVERRIDE}
--cleanup-vms=true
--test-report-folder=reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ phases:
if [ -f ./bin/local-bundle-release.yaml ]; then
BUNDLES_OVERRIDE=true
fi
- SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml)
- mv bin/tinkerbell/e2e.test bin/e2e.test
- >
./bin/test e2e run
Expand All @@ -99,7 +98,6 @@ phases:
-p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT}
-r 'Test'
-v 4
--skip ${SKIPPED_TESTS}
--bundles-override=${BUNDLES_OVERRIDE}
--cleanup-vms=true
--test-report-folder=reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ phases:
if [ -f ./bin/local-bundle-release.yaml ]; then
BUNDLES_OVERRIDE=true
fi
- SKIPPED_TESTS=$(yq e ".skipped_tests | @csv" ${CODEBUILD_SRC_DIR}/test/e2e/SKIPPED_TESTS.yaml)
- mv bin/vsphere/e2e.test bin/e2e.test
- >
./bin/test e2e run
Expand All @@ -123,7 +122,6 @@ phases:
-p ${INTEGRATION_TEST_MAX_CONCURRENT_TEST_COUNT}
-r 'Test'
-v 4
--skip ${SKIPPED_TESTS}
--bundles-override=${BUNDLES_OVERRIDE}
--cleanup-vms=true
--test-report-folder=reports
Expand Down
4 changes: 0 additions & 4 deletions cmd/integration_test/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const (
regexFlagName = "regex"
maxInstancesFlagName = "max-instances"
maxConcurrentTestsFlagName = "max-concurrent-tests"
skipFlagName = "skip"
bundlesOverrideFlagName = "bundles-override"
cleanupVmsFlagName = "cleanup-vms"
testReportFolderFlagName = "test-report-folder"
Expand Down Expand Up @@ -64,7 +63,6 @@ func init() {
runE2ECmd.Flags().StringP(regexFlagName, "r", "", "Run only those tests and examples matching the regular expression. Equivalent to go test -run")
runE2ECmd.Flags().IntP(maxInstancesFlagName, "m", 1, "Run tests in parallel on same instance within the max EC2 instance count")
runE2ECmd.Flags().IntP(maxConcurrentTestsFlagName, "p", 1, "Maximum number of parallel tests that can be run at a time")
runE2ECmd.Flags().StringSlice(skipFlagName, nil, "List of tests to skip")
runE2ECmd.Flags().Bool(bundlesOverrideFlagName, false, "Flag to indicate if the tests should run with a bundles override")
runE2ECmd.Flags().Bool(cleanupVmsFlagName, false, "Flag to indicate if VSphere VMs should be cleaned up automatically as tests complete")
runE2ECmd.Flags().String(testReportFolderFlagName, "", "Folder destination for JUnit tests reports")
Expand All @@ -86,7 +84,6 @@ func runE2E(ctx context.Context) error {
testRegex := viper.GetString(regexFlagName)
maxInstances := viper.GetInt(maxInstancesFlagName)
maxConcurrentTests := viper.GetInt(maxConcurrentTestsFlagName)
testsToSkip := viper.GetStringSlice(skipFlagName)
bundlesOverride := viper.GetBool(bundlesOverrideFlagName)
cleanupVms := viper.GetBool(cleanupVmsFlagName)
testReportFolder := viper.GetString(testReportFolderFlagName)
Expand All @@ -100,7 +97,6 @@ func runE2E(ctx context.Context) error {
StorageBucket: storageBucket,
JobId: jobId,
Regex: testRegex,
TestsToSkip: testsToSkip,
BundlesOverride: bundlesOverride,
CleanupVms: cleanupVms,
TestReportFolder: testReportFolder,
Expand Down
15 changes: 4 additions & 11 deletions internal/test/e2e/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,27 @@ import (
"strings"

"github.com/aws/eks-anywhere/pkg/executables"
"github.com/aws/eks-anywhere/pkg/types"
)

func listTests(regex string, testsToSkip []string) (tests, skippedTests []string, err error) {
func listTests(regex string) (tests []string, err error) {
e := executables.NewExecutable(filepath.Join("bin", e2eBinary))
ctx := context.Background()
testResponse, err := e.Execute(ctx, "-test.list", regex)
if err != nil {
return nil, nil, fmt.Errorf("failed listing test from e2e binary: %v", err)
return nil, fmt.Errorf("failed listing test from e2e binary: %v", err)
}

skipLookup := types.SliceToLookup(testsToSkip)
scanner := bufio.NewScanner(&testResponse)
for scanner.Scan() {
line := scanner.Text()
if skipLookup.IsPresent(line) {
skippedTests = append(skippedTests, line)
continue
}

if strings.HasPrefix(line, "Test") {
tests = append(tests, line)
}
}

if err := scanner.Err(); err != nil {
return nil, nil, fmt.Errorf("failed reading e2e list response: %v", err)
return nil, fmt.Errorf("failed reading e2e list response: %v", err)
}

return tests, skippedTests, nil
return tests, nil
}
5 changes: 2 additions & 3 deletions internal/test/e2e/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ type ParallelRunConf struct {
StorageBucket string
JobId string
Regex string
TestsToSkip []string
BundlesOverride bool
CleanupVms bool
TestReportFolder string
Expand All @@ -65,12 +64,12 @@ type (

// RunTestsInParallel Run Tests in parallel by spawning multiple admin machines.
func RunTestsInParallel(conf ParallelRunConf) error {
testsList, skippedTests, err := listTests(conf.Regex, conf.TestsToSkip)
testsList, err := listTests(conf.Regex)
if err != nil {
return err
}

conf.Logger.Info("Running tests", "selected", testsList, "skipped", skippedTests)
conf.Logger.Info("Running tests", "selected", testsList)

if conf.TestReportFolder != "" {
if err = os.MkdirAll(conf.TestReportFolder, os.ModePerm); err != nil {
Expand Down
107 changes: 0 additions & 107 deletions test/e2e/SKIPPED_TESTS.yaml

This file was deleted.

Loading