Skip to content

Commit

Permalink
Merge branch 'feature/CB2-12113' of https://github.com/dvsa/cvs-tsk-u…
Browse files Browse the repository at this point in the history
…pdate-store into feature/CB2-11268
  • Loading branch information
shivangidas committed May 9, 2024
2 parents bdfb4e4 + c7fd6b5 commit 4178ca2
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ On Windows, you will need to manually run:
* Confirm: `echo %USE_CONTAINERIZED_DATABASE%` should return `1`before the above, or run these tests with an IntelliJ configuration which sets the right environment variable for you.

On Tanio Artino's advice, there is a distinction between running integration tests locally, and running them on Jenkins.
* `USE_CONTAINERIZED_DATABASE=0` will attempt to talk to `localhost:3306`. This only works if you manually start a DB or, in the case of Jenkins, if there is a pre-existing DB running on port `3306`.
* `USE_CONTAINERIZED_DATABASE=0` will attempt to talk to `127.0.0.1:3306`. This only works if you manually start a DB or, in the case of Jenkins, if there is a pre-existing DB running on port `3306`.
* `USE_CONTAINERIZED_DATABASE=1` will spin up a TC container as described above.

To run the "Jenkins" version, e.g. `USE_CONTAINERIZED_DATABASE=0`, use:
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sonar.projectKey=org.sonarqube:cvs-tsk-update-store
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=cvs-tsk-update-store

sonar.host.url=http://localhost:9000
sonar.host.url=http://127.0.0.1:9000

sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe("convertTechRecordDocument() integration tests", () => {
container = await getContainerizedDatabase();
} else {
(getConnectionPoolOptions as jest.Mock) = jest.fn().mockResolvedValue({
host: "localhost",
host: "127.0.0.1",
port: "3306",
user: "root",
password: "12345",
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/cvsbnop-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const getContainerizedDatabase = async (): Promise<StartedTestContainer>
"--password",
"12345",
"--url",
`jdbc:mysql://localhost:${hostPort}/${databaseName}`,
`jdbc:mysql://127.0.0.1:${hostPort}/${databaseName}`,
"--classpath",
`${pathToResources()}/mysql-connector-java-8.0.23.jar`,
"update",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe("convertTechRecordDocument() integration tests", () => {
container = await getContainerizedDatabase();
} else {
(getConnectionPoolOptions as jest.Mock) = jest.fn().mockResolvedValue({
host: "localhost",
host: "127.0.0.1",
port: "3306",
user: "root",
password: "12345",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe("convertTestResults() integration tests with delete", () => {
container = await getContainerizedDatabase();
} else {
(getConnectionPoolOptions as jest.Mock) = jest.fn().mockResolvedValue({
host: "localhost",
host: "127.0.0.1",
port: "3306",
user: "root",
password: "12345",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe("convertTestResults() integration tests with upsert", () => {
container = await getContainerizedDatabase();
} else {
(getConnectionPoolOptions as jest.Mock) = jest.fn().mockResolvedValue({
host: "localhost",
host: "127.0.0.1",
port: "3306",
user: "root",
password: "12345",
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const useLocalDb = (): void => {
username: "root",
password: "12345",
engine: "",
host: "localhost",
host: "127.0.0.1",
port: 3306,
dbname: "",
dbClusterIdentifier: "",
Expand Down

0 comments on commit 4178ca2

Please sign in to comment.