Skip to content

Commit

Permalink
[RFR] Source analysis on tackle app with hash in Password (konveyor#1240
Browse files Browse the repository at this point in the history
)

Signed-off-by: Karishma Punwatkar <[email protected]>

	modified:   cypress/e2e/models/administration/credentials/credentialsSourceControlUsername.ts
	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts

	modified:   cypress/e2e/tests/migration/applicationinventory/analysis/source_analysis.test.ts
  • Loading branch information
kpunwatk authored Oct 29, 2024
1 parent 86ebea2 commit 6e4e92a
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { CredentialsSourceControlKey } from "../../../../models/administration/c
import { Application } from "../../../../models/migration/applicationinventory/application";
import { AppIssue } from "../../../../types/types";
let source_credential: CredentialsSourceControlUsername;
let source_credential_withHash: CredentialsSourceControlUsername;
let maven_credential: CredentialsMaven;
let applicationsList: Array<Analysis> = [];

Expand All @@ -53,6 +54,17 @@ describe(["@tier1"], "Source Analysis", () => {
);
source_credential.create();

// Create source Credentials with # in password
source_credential_withHash = new CredentialsSourceControlUsername(
data.getRandomCredentialsData(
CredentialType.sourceControl,
UserCredentials.usernamePassword,
true
)
);
source_credential_withHash.password = "#" + source_credential_withHash.password;
source_credential_withHash.create();

// Create Maven credentials
maven_credential = new CredentialsMaven(
data.getRandomCredentialsData(CredentialType.maven, null, true)
Expand Down Expand Up @@ -401,6 +413,23 @@ describe(["@tier1"], "Source Analysis", () => {
);
});

it("Bug MTA-3701: Source analysis on tackle app with hash in Password", function () {
const application = new Analysis(
getRandomApplicationData("tackleTestApp_Source", {
sourceData: this.appData["tackle-testapp-git"],
}),
getRandomAnalysisData(this.analysisData["tackleTestApp_Source"])
);

// Analysis application with source credential created with hash
Application.open();
application.create();
application.manageCredentials(source_credential_withHash.name);
applicationsList.push(application);
application.analyze();
application.verifyAnalysisStatus("Completed");
});

after("Perform test data clean up", function () {
deleteByList(applicationsList);
writeMavenSettingsFile(data.getRandomWord(5), data.getRandomWord(5));
Expand Down

0 comments on commit 6e4e92a

Please sign in to comment.