Skip to content

Commit

Permalink
Add negative tests for generate
Browse files Browse the repository at this point in the history
  • Loading branch information
simongottschlag committed Jan 5, 2023
1 parent dc33bee commit 7b9ce2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/kubectl-azad-proxy/generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ func TestRunGenerate(t *testing.T) {
}
err = runGenerate(ctx, cfg, authCfg)
require.NoError(t, err)

require.ErrorContains(t, runGenerate(ctx, generateConfig{}, authConfig{}), "Unable to load file")
require.ErrorContains(t, runGenerate(ctx, generateConfig{ProxyURL: "$#%~!-_"}, authConfig{}), "invalid URL escape")
}

func TestGenerate(t *testing.T) {
Expand Down

0 comments on commit 7b9ce2d

Please sign in to comment.