Skip to content

Commit

Permalink
Fixes after rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Josef Kopriva <[email protected]>
  • Loading branch information
jkopriva committed Sep 30, 2024
1 parent 2aa8860 commit 3a64636
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 33 deletions.
6 changes: 1 addition & 5 deletions src/utils/test.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export async function cleanAfterTestGitLab(gitLabProvider: GitLabProvider, kubeC
await kubeClient.deleteApplicationFromNamespace(rootNamespace, `${repositoryName}-app-of-apps`)
}

<<<<<<< HEAD
export async function waitForStringInPageContent(
url: string,
searchString: string,
Expand Down Expand Up @@ -57,7 +56,7 @@ export async function waitForStringInPageContent(
// Return false if the timeout is reached and the string was not found
return false;
}
=======

export async function beforeChecks(componentRootNamespace: string, githubOrganization: string, quayImageOrg: string, developmentNamespace: string, kubeClient: Kubernetes) {
if (componentRootNamespace === '') {
throw new Error("The 'APPLICATION_TEST_NAMESPACE' environment variable is not set. Please ensure that the environment variable is defined properly or you have cluster connection.");
Expand Down Expand Up @@ -99,6 +98,3 @@ export async function checkComponentInBackstage(backstageClient: DeveloperHubCli
const componentUid = await backstageClient.getComponentUid(repositoryName);
expect(componentUid).toBeDefined()
}


>>>>>>> f38895f (Sonar fixes)
4 changes: 2 additions & 2 deletions tests/gpts/github/go.unregister.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gitHubBasicGoldenPathTemplateTests } from "./test-config/github_import_template.ts";
import { gitHubImportTemplateTests } from "./test-config/github_import_template.ts";
import { skipSuite } from "../../test-utils.ts";
import { loadSoftwareTemplatesTestsGlobals } from "./test-config/config.ts";

Expand All @@ -9,7 +9,7 @@ const runGolangBasicTests = () => {

if (configuration.templates.includes(golangTemplateName) && configuration.github.active) {

gitHubBasicGoldenPathTemplateTests(golangTemplateName);
gitHubImportTemplateTests(golangTemplateName);
} else {
skipSuite(golangTemplateName);
}
Expand Down
8 changes: 5 additions & 3 deletions tests/gpts/github/test-config/github_import_template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { beforeChecks, checkComponentInBackstage, cleanAfterTestGitHub } from ".
* 5. Add component/location to RHDH
* 6. Check that components gets created successfully in Red Hat Developer Hub
*/
export const gitHubBasicGoldenPathTemplateTests = (gptTemplate: string) => {
export const gitHubImportTemplateTests = (gptTemplate: string) => {
describe(`Red Hat Trusted Application Pipeline ${gptTemplate} GPT tests GitHub provider with public/private image registry`, () => {
jest.retryTimes(2);

Expand All @@ -29,6 +29,7 @@ export const gitHubBasicGoldenPathTemplateTests = (gptTemplate: string) => {

const quayImageName = "rhtap-qe";
const quayImageOrg = process.env.QUAY_IMAGE_ORG || '';
const imageRegistry = process.env.IMAGE_REGISTRY || 'quay.io';

let developerHubTask: TaskIdReponse;
let gitHubClient: GitHubProvider;
Expand Down Expand Up @@ -78,12 +79,13 @@ export const gitHubBasicGoldenPathTemplateTests = (gptTemplate: string) => {
hostType: 'GitHub',
imageName: quayImageName,
imageOrg: quayImageOrg,
imageRegistry: 'quay.io',
imageRegistry: imageRegistry,
name: repositoryName,
namespace: componentRootNamespace,
owner: "user:guest",
repoName: repositoryName,
repoOwner: githubOrganization
repoOwner: githubOrganization,
ciType: "tekton"
}
};

Expand Down
49 changes: 26 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1174,12 +1174,16 @@
cross-fetch "^4.0.0"
uri-template "^2.0.0"

<<<<<<< HEAD
"@backstage/[email protected]", "@backstage/catalog-model@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@backstage/catalog-model/-/catalog-model-1.5.0.tgz#7f5c4a80a3341555db5209fbc6fc2d25f6500707"
integrity sha512-CfLO5/DMGahneuLU4KTQEs1tgNhBciUtyGUDZB4Ii9i1Uha1poWcqp4HKg61lj1hmXNDUHmlbFqY9W7kmzRC0A==
=======
dependencies:
"@backstage/errors" "^1.2.4"
"@backstage/types" "^1.1.1"
ajv "^8.10.0"
lodash "^4.17.21"

"@backstage/catalog-model@^1.4.3":
version "1.4.3"
resolved "https://registry.yarnpkg.com/@backstage/catalog-model/-/catalog-model-1.4.3.tgz#64abf34071d1cad6372f905b92e1d831e480750c"
Expand All @@ -1194,7 +1198,6 @@
version "1.4.5"
resolved "https://registry.yarnpkg.com/@backstage/catalog-model/-/catalog-model-1.4.5.tgz#b8f6309ff12b72dffdfe852d615c553ae13452c0"
integrity sha512-I4QOCy0pSXJikQWgC8MWj2zDRCgQnnmvnNOOnPFcg7hIIIzeV0sGp6d3Qi7bc2tvzXt3fT3biSOCgGOWi1IJKA==
>>>>>>> 0a961e7 (RHTAP-2547)
dependencies:
"@backstage/errors" "^1.2.4"
"@backstage/types" "^1.1.1"
Expand Down Expand Up @@ -1264,7 +1267,7 @@
"@types/react" "^16.13.1 || ^17.0.0 || ^18.0.0"
history "^5.0.0"

"@backstage/errors@^1.2.4":
"@backstage/errors@^1.2.3", "@backstage/errors@^1.2.4":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@backstage/errors/-/errors-1.2.4.tgz#2ba79c6308e87b0de99edf499e1c82477d3d6e8a"
integrity sha512-JBhKn9KwZTzp/AaOC0vBncKCM1vI9Z8rKKyr9vj3wt3SSgCnDPxNwVz7SlXa2Rc9TOQq0Yk3olkmQE9U+S5uWg==
Expand Down Expand Up @@ -1366,7 +1369,6 @@
lodash "^4.17.21"
luxon "^3.0.0"

<<<<<<< HEAD
"@backstage/plugin-kubernetes-common@^0.8.0":
version "0.8.1"
resolved "https://registry.yarnpkg.com/@backstage/plugin-kubernetes-common/-/plugin-kubernetes-common-0.8.1.tgz#9fe97ccfdb6b9f4fcabc846f5cb9c9bfeae410e5"
Expand Down Expand Up @@ -1408,16 +1410,22 @@
xterm-addon-attach "^0.9.0"
xterm-addon-fit "^0.8.0"

"@backstage/plugin-permission-common@^0.7.14":
"@backstage/plugin-permission-common@^0.7.11", "@backstage/plugin-permission-common@^0.7.14":
version "0.7.14"
resolved "https://registry.yarnpkg.com/@backstage/plugin-permission-common/-/plugin-permission-common-0.7.14.tgz#ecb12877c412ff271124af54fca46ec06d9c812f"
integrity sha512-fHbxhX9ZoT8bTVuGycfTeU/6TE2yjZ6YNvm/2ko1bcxGnvYe1p5Ug5JW+iWjDZS+F6F152tWzhRcg05wQlPNKQ==
=======
dependencies:
"@backstage/config" "^1.2.0"
"@backstage/errors" "^1.2.4"
"@backstage/types" "^1.1.1"
cross-fetch "^4.0.0"
uuid "^9.0.0"
zod "^3.22.4"

"@backstage/plugin-permission-common@^0.7.13":
version "0.7.13"
resolved "https://registry.yarnpkg.com/@backstage/plugin-permission-common/-/plugin-permission-common-0.7.13.tgz#ea8509d2a38063309b8726ee6be8b95e1f99e5b9"
integrity sha512-FGC6qrQc96SuovRCWQARDKss7TRenusMX9i0k0Devx/0+h2jM0TYYtuJ52jAFSAx9Db3BRRSlj9M5AQFgjoNmg==
>>>>>>> 0a961e7 (RHTAP-2547)
dependencies:
"@backstage/config" "^1.2.0"
"@backstage/errors" "^1.2.4"
Expand Down Expand Up @@ -1449,27 +1457,22 @@
"@types/react" "^16.13.1 || ^17.0.0 || ^18.0.0"
swr "^2.0.0"

"@backstage/plugin-scaffolder-common@^1.5.1", "@backstage/plugin-scaffolder-common@^1.5.4":
version "1.5.4"
resolved "https://registry.yarnpkg.com/@backstage/plugin-scaffolder-common/-/plugin-scaffolder-common-1.5.4.tgz#b1fed2735b1a373f8e56e4d99d8e1af972e11f4c"
integrity sha512-oSyKLv+055SIOKge1NrQQrnwb9944Ov1aWm9jWCcQ20+ejWCc9STJWtiZ0POZbtbo6fVpJiBLdzQDqnmLzyuLA==
dependencies:
<<<<<<< HEAD
"@backstage/catalog-model" "^1.5.0"
"@backstage/plugin-permission-common" "^0.8.0"
=======
"@backstage/catalog-model" "^1.4.3"
"@backstage/plugin-permission-common" "^0.7.11"
"@backstage/types" "^1.1.1"

"@backstage/plugin-scaffolder-common@^1.5.1":
version "1.5.1"
resolved "https://registry.yarnpkg.com/@backstage/plugin-scaffolder-common/-/plugin-scaffolder-common-1.5.1.tgz#cd79c2b222ae03a6906f1599d71c1ef385710f57"
integrity sha512-4ULWyWb7U8N4iUP6LR7SleS1G3pmMkeAvZ/u2OFWyWp1kU2Mgx+SfskZDYNgVb8T4viNlU6nKlsYCkcOSrf4Hw==
dependencies:
"@backstage/catalog-model" "^1.4.5"
"@backstage/plugin-permission-common" "^0.7.13"
>>>>>>> 0a961e7 (RHTAP-2547)
"@backstage/types" "^1.1.1"

"@backstage/plugin-scaffolder-common@^1.5.4":
version "1.5.4"
resolved "https://registry.yarnpkg.com/@backstage/plugin-scaffolder-common/-/plugin-scaffolder-common-1.5.4.tgz#b1fed2735b1a373f8e56e4d99d8e1af972e11f4c"
integrity sha512-oSyKLv+055SIOKge1NrQQrnwb9944Ov1aWm9jWCcQ20+ejWCc9STJWtiZ0POZbtbo6fVpJiBLdzQDqnmLzyuLA==
dependencies:
"@backstage/catalog-model" "^1.5.0"
"@backstage/plugin-permission-common" "^0.8.0"
"@backstage/types" "^1.1.1"

"@backstage/plugin-scaffolder-react@^1.7.0":
Expand Down Expand Up @@ -8075,4 +8078,4 @@ zod@^3.22.4:
zwitch@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7"
integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==
integrity sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==

0 comments on commit 3a64636

Please sign in to comment.