Skip to content

Commit

Permalink
Add test for offline url validation
Browse files Browse the repository at this point in the history
Signed-off-by: Mehdy Khoshnoody <[email protected]>
  • Loading branch information
mehdy committed Aug 27, 2020
1 parent f0bd8c7 commit 16acbe4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testing/test_configs/invalid_offline_url.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
origin: http://127.0.0.1:51596
issue_tracker: JIRA
auth:
type: offline
offline_url: INVALID_URL
11 changes: 11 additions & 0 deletions testing/todocheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,17 @@ func TestInvalidIssueTracker(t *testing.T) {
}
}

func TestInvalidOfflineURL(t *testing.T) {
err := scenariobuilder.NewScenario().
WithBinary("../todocheck").
WithConfig("./test_configs/invalid_offline_url.yaml").
ExpectExecutionError().
Run()
if err != nil {
t.Errorf("%s", err)
}
}

func TestTraversingNonExistentDirectory(t *testing.T) {
err := scenariobuilder.NewScenario().
WithBinary("../todocheck").
Expand Down

0 comments on commit 16acbe4

Please sign in to comment.