Skip to content

Commit

Permalink
fix tests to comply
Browse files Browse the repository at this point in the history
  • Loading branch information
camlyall committed Jul 26, 2023
1 parent ee32249 commit 541bec7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions internal/nha/activities/hari_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func TestHARIActivity(t *testing.T) {
Type: nha.TransferTypeDPJ,
},
},
hariConfig: map[string]interface{}{"baseURL": "http://192.168.1.50:12345"},
hariConfig: map[string]interface{}{"baseurl": "http://192.168.1.50:12345"},
dirOpts: []fs.PathOp{
fs.WithDir("DPJ/journal"),
fs.WithFile("DPJ/journal/_____other_name_____.xml", "<avlxml/>"),
Expand All @@ -412,7 +412,7 @@ func TestHARIActivity(t *testing.T) {
Type: nha.TransferTypeDPJ,
},
},
hariConfig: map[string]interface{}{"baseURL": string([]byte{0x7f})},
hariConfig: map[string]interface{}{"baseurl": string([]byte{0x7f})},
dirOpts: []fs.PathOp{
fs.WithDir("DPJ/journal"),
fs.WithFile("DPJ/journal/avlxml.xml", "<avlxml/>"),
Expand Down Expand Up @@ -455,8 +455,8 @@ func TestHARIActivity(t *testing.T) {

// Only override baseURL when the test case did not define it.
if tc.hariConfig != nil {
if _, ok := tc.hariConfig["baseURL"]; !ok {
tc.hariConfig["baseURL"] = deliveree.URL
if _, ok := tc.hariConfig["baseurl"]; !ok {
tc.hariConfig["baseurl"] = deliveree.URL
}
}

Expand Down Expand Up @@ -539,7 +539,7 @@ func TestHARIURL(t *testing.T) {
}
for _, tc := range tests {
act := createHariActivity(t, map[string]interface{}{
"baseURL": tc.baseURL,
"baseurl": tc.baseURL,
})

have, err := act.url()
Expand Down
4 changes: 2 additions & 2 deletions internal/nha/activities/prod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestProdActivity(t *testing.T) {
},
},
hookConfig: &map[string]interface{}{
"receiptPath": tmpdir,
"receiptpath": tmpdir,
},
wantErr: "error creating receipt file",
wantNonRetryableError: true,
Expand All @@ -128,7 +128,7 @@ func TestProdActivity(t *testing.T) {

tmpdir := fs.NewDir(t, "enduro")
defer tmpdir.Remove()
hookConfig := map[string]interface{}{"receiptPath": tmpdir.Path()}
hookConfig := map[string]interface{}{"receiptpath": tmpdir.Path()}
if tc.hookConfig != nil {
hookConfig = *tc.hookConfig
}
Expand Down

0 comments on commit 541bec7

Please sign in to comment.