Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evg4b committed Mar 19, 2023
1 parent bdfaa11 commit 6d0be38
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions internal/configuration/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,15 @@ func TestLoadConfiguration(t *testing.T) {
},
expected: "recognize url mapping: `from` values are not set for every `to`",
},
// TODO: Update errors for this test
// {
// name: "configuration file doesn't exist",
// args: []string{
// "--config", "/not-exist-config.yaml",
// },
// expected: "filed to read config file '/not-exist-config.yaml': " +
// "open /Users/evg4b/Documents/uncors/internal/configuration/config_" +
// "test_data/not-exist-config.yaml: no such file or directory",
// },
{
name: "configuration file doesn't exist",
args: []string{
"--config", "/not-exist-config.yaml",
},
expected: "filed to read config file '/not-exist-config.yaml': " +
"open /Users/evg4b/Documents/uncors/internal/configuration/config_" +
"test_data/not-exist-config.yaml: no such file or directory",
},
{
name: "configuration file is corrupted",
args: []string{
Expand All @@ -195,7 +194,7 @@ func TestLoadConfiguration(t *testing.T) {
args: []string{
"--http-port", "xxx",
},
expected: "filed parsing flags: invalid argument \"xxx\" for \"--http-port\" flag: " +
expected: "filed parsing flags: invalid argument \"xxx\" for \"-p, --http-port\" flag: " +
"strconv.ParseUint: parsing \"xxx\": invalid syntax",
},
{
Expand Down

0 comments on commit 6d0be38

Please sign in to comment.