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

[RHTAP-3026] Adds test groups #159

Open
wants to merge 1 commit 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
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ module.exports = {
"expand": true,
"pageTitle": "Red Hat Trusted Application Pipeline e2e report",
}],
]
],
runner: "groups"
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"eslint-plugin-no-null": "^1.0.2",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"jest-runner-groups": "^2.2.0",
"jest-stare": "^2.5.1",
"prettier": "^2.5.1",
"ts-jest": "^29.1.1",
Expand All @@ -41,4 +42,4 @@
"jest-html-reporters": "^3.1.7",
"unique-names-generator": "^4.7.1"
}
}
}
9 changes: 9 additions & 0 deletions tests/gpts/github/dotnet.jenkins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";
import { gitHubJenkinsBasicGoldenPathTemplateTests } from "./test-config/github_suite_jenkins.ts";

/**
* Tests dotnet template in GitHub with Jenkins
*
* @group jenkins
* @group dotnet
* @group github
* @group basic
*/

const dotNetTemplateName = 'dotnet-basic';
const stringOnRoute = 'Welcome';

Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/dotnet.tekton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitHubBasicGoldenPathTemplateTests } from "./test-config/github_positiv
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";

/**
* Tests dotnet template in GitHub with Tekton
*
* @group tekton
* @group dotnet
* @group github
* @group basic
*/

const dotNetTemplateName = 'dotnet-basic';

const runDotNetBasicTests = () => {
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/go.jenkins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitHubJenkinsBasicGoldenPathTemplateTests } from "./test-config/github_
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";

/**
* Tests Go template in GitHub with Jenkins
*
* @group jenkins
* @group go
* @group github
* @group basic
*/

const golangTemplateName = 'go';
const stringOnRoute = 'Hello World!';

Expand Down
11 changes: 10 additions & 1 deletion tests/gpts/github/go.tekton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@ import { gitHubBasicGoldenPathTemplateTests } from "./test-config/github_positiv
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";

/**
* Tests Go template in GitHub with Tekton
*
* @group tekton
* @group go
* @group github
* @group basic
*/

const golangTemplateName = 'go';

const runGolangBasicTests = () => {
const configuration = loadSoftwareTemplatesTestsGlobals()

if (configuration.templates.includes(golangTemplateName) && configuration.github.active && configuration.github.tekton) {
gitHubBasicGoldenPathTemplateTests(golangTemplateName);
gitHubBasicGoldenPathTemplateTests(golangTemplateName);
} else {
skipSuite(golangTemplateName);
}
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/nodejs.jenkins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";
import { gitHubJenkinsBasicGoldenPathTemplateTests } from "./test-config/github_suite_jenkins.ts";

/**
* Tests Nodejs template in GitHub with Jenkins
*
* @group jenkins
* @group nodejs
* @group github
* @group basic
*/

const nodejsTemplateName = 'nodejs';
const stringOnRoute = 'Hello from Node.js Starter Application!';

Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/nodejs.tekton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitHubBasicGoldenPathTemplateTests } from "./test-config/github_positiv
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";

/**
* Tests Nodejs template in GitHub with Tekton
*
* @group tekton
* @group nodejs
* @group github
* @group basic
*/

const nodejsTemplateName = 'nodejs';

const runNodeJSBasicTests = () => {
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/python.jenkins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";
import { gitHubJenkinsBasicGoldenPathTemplateTests } from "./test-config/github_suite_jenkins.ts";

/**
* Tests Python template in GitHub with Jenkins
*
* @group jenkins
* @group python
* @group github
* @group basic
*/

const pythonTemplateName = 'python';
const stringOnRoute = 'Hello World!';

Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/python.tekton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitHubBasicGoldenPathTemplateTests } from "./test-config/github_positiv
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";

/**
* Tests Python template in GitHub with Tekton
*
* @group tekton
* @group python
* @group github
* @group basic
*/

const pythonTemplateName = 'python';

const runPythonBasicTests = () => {
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/quarkus.jenkins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";
import { gitHubJenkinsBasicGoldenPathTemplateTests } from "./test-config/github_suite_jenkins.ts";

/**
* Tests Quarkus template in GitHub with Jenkins
*
* @group jenkins
* @group quarkus
* @group github
* @group basic
*/

const quarkusTemplateName = 'java-quarkus';
const stringOnRoute = 'Congratulations, you have created a new Quarkus cloud application.';

Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/quarkus.tekton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";
import { githubSoftwareTemplatesAdvancedScenarios } from "./test-config/github_advanced_scenario.ts";

/**
* Tests Quarkus template in Github with Tekton
*
* @group tekton
* @group quarkus
* @group github
* @group advanced
*/

const quarkusTemplateName = 'java-quarkus';

const runQuarkusBasicTests = () => {
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/springboot.jenkins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";
import { gitHubJenkinsBasicGoldenPathTemplateTests } from "./test-config/github_suite_jenkins.ts";

/**
* Tests SpringBoot template in GitHub with Jenkins
*
* @group jenkins
* @group springboot
* @group github
* @group basic
*/

const springBootTemplateName = 'java-springboot';
const stringOnRoute = 'Hello World!';

Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/github/springboot.tekton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitHubBasicGoldenPathTemplateTests } from "./test-config/github_positiv
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";

/**
* Tests SpringBoot template in GitHub with Tekton
*
* @group tekton
* @group springboot
* @group github
* @group basic
*/

const springBootTemplateName = 'java-springboot';

const runSpringBootBasicTests = () => {
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/gitlab/dotnet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitLabProviderBasicTests } from "./suites-config/gitlab_positive_suite.
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "../github/test-config/config.ts";

/**
* Tests dotnet template in GitLab with Tekton
*
* @group tekton
* @group dotnet
* @group gitlab
* @group basic
*/

const dotNetTemplateName = 'dotnet-basic';

const runDotNetBasicTests = () => {
Expand Down
10 changes: 10 additions & 0 deletions tests/gpts/gitlab/go.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import { gitLabProviderBasicTests } from "./suites-config/gitlab_positive_suite.ts";
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "../github/test-config/config.ts";

/**
* Tests Go template in GitLab with Tekton
*
* @group tekton
* @group go
* @group gitlab
* @group basic
*/

const golangTemplateName = 'go';

const runGolangBasicTests = () => {
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/gitlab/nodejs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitLabProviderBasicTests } from "./suites-config/gitlab_positive_suite.
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "../github/test-config/config.ts";

/**
* Tests Nodejs template in GitLab with Tekton
*
* @group tekton
* @group nodejs
* @group gitlab
* @group basic
*/

const nodejsTemplateName = 'nodejs';

const runNodeJSBasicTests = () => {
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/gitlab/python.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitLabProviderBasicTests } from "./suites-config/gitlab_positive_suite.
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "../github/test-config/config.ts"

/**
* Tests Python template in GitLab with Tekton
*
* @group tekton
* @group python
* @group gitlab
* @group basic
*/

const pythonTemplateName = 'python';

const runPythonBasicTests = () => {
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/gitlab/quarkus.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitLabSoftwareTemplatesAdvancedScenarios } from "./suites-config/gitlab
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "../github/test-config/config.ts"

/**
* Tests Quarkus template in GitLab with Tekton
*
* @group tekton
* @group quarkus
* @group gitlab
* @group advanced
*/

const quarkusTemplateName = 'java-quarkus';

const runQuarkusBasicTests = () => {
Expand Down
9 changes: 9 additions & 0 deletions tests/gpts/gitlab/springboot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { gitLabProviderBasicTests } from "./suites-config/gitlab_positive_suite.
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "../github/test-config/config.ts";

/**
* Tests SpringBoot template in GitLab with Tekton
*
* @group tekton
* @group springboot
* @group gitlab
* @group basic
*/

const springBootTemplateName = 'java-springboot';

const runSpringBootBasicTests = () => {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5148,6 +5148,11 @@ jest-resolve@^29.7.0:
resolve.exports "^2.0.0"
slash "^3.0.0"

jest-runner-groups@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/jest-runner-groups/-/jest-runner-groups-2.2.0.tgz#e8ac453322c1f001086f4ea0299b8c4c5bd89166"
integrity sha512-Sp/B9ZX0CDAKa9dIkgH0sGyl2eDuScV4SVvOxqhBMxqWpsNAkmol/C58aTFmPWZj+C0ZTW1r1BSu66MTCN+voA==

jest-runner@^29.7.0:
version "29.7.0"
resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e"
Expand Down