Skip to content

Commit

Permalink
BCDA-6873: updated test IPs to non-routable IPs (#852)
Browse files Browse the repository at this point in the history
## 🎫 Ticket

https://jira.cms.gov/browse/BCDA-6873

## 🛠 Changes

Updated the test IP addresses so that they are
non-sensitive/non-routable.

## ℹ️ Context for reviewers

Updating IP addresses in tests added in [PR
#849](#849)

## ✅ Acceptance Validation

ran tests locally and CI.

## 🔒 Security Implications

- [ ] This PR adds a new software dependency or dependencies.
- [ ] This PR modifies or invalidates one or more of our security
controls.
- [ ] This PR stores or transmits data that was not stored or
transmitted before.
- [ ] This PR requires additional review of its security implications
for other reasons.

If any security implications apply, add Jason Ashbaugh (GitHub username:
StewGoin) as a reviewer and do not merge this PR without his approval.
  • Loading branch information
laurenkrugen-navapbc committed Jul 11, 2023
1 parent ba73dfe commit 39e5115
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions bcda/nrpgx/nrpgx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,29 +99,29 @@ func TestParseDSN(t *testing.T) {
// key,value pairs
// #11
{
dsn: "host=1.2.3.4 port=1234 dbname=mydb",
expHost: "1.2.3.4",
dsn: "host=0.0.0.0 port=1234 dbname=mydb",
expHost: "0.0.0.0",
expPortPathOrID: "1234",
expDatabaseName: "mydb",
},
// #12
{
dsn: "host =1.2.3.4 port= 1234 dbname = mydb",
expHost: "1.2.3.4",
dsn: "host =0.0.0.0 port= 1234 dbname = mydb",
expHost: "0.0.0.0",
expPortPathOrID: "1234",
expDatabaseName: "mydb",
},
// #13
{
dsn: "host = 1.2.3.4 port=\t\t1234 dbname =\n\t\t\tmydb",
expHost: "1.2.3.4",
dsn: "host = 0.0.0.0 port=\t\t1234 dbname =\n\t\t\tmydb",
expHost: "0.0.0.0",
expPortPathOrID: "1234",
expDatabaseName: "mydb",
},
// #14
{
dsn: "host ='1.2.3.4' port= '1234' dbname = 'mydb'",
expHost: "1.2.3.4",
dsn: "host ='0.0.0.0' port= '1234' dbname = 'mydb'",
expHost: "0.0.0.0",
expPortPathOrID: "1234",
expDatabaseName: "mydb",
},
Expand All @@ -140,20 +140,20 @@ func TestParseDSN(t *testing.T) {
},
// #17
{
dsn: "host=1.2.3.4 hostaddr=5.6.7.8",
dsn: "host=0.0.0.0 hostaddr=5.6.7.8",
expHost: "5.6.7.8",
expPortPathOrID: "5432",
},
// #18
{
dsn: "hostaddr=5.6.7.8 host=1.2.3.4",
dsn: "hostaddr=5.6.7.8 host=0.0.0.0",
expHost: "5.6.7.8",
expPortPathOrID: "5432",
},
// #19
{
dsn: "hostaddr=1.2.3.4",
expHost: "1.2.3.4",
dsn: "hostaddr=0.0.0.0",
expHost: "0.0.0.0",
expPortPathOrID: "5432",
},
// #20
Expand Down

0 comments on commit 39e5115

Please sign in to comment.