From b7045f27a9cb9f0c48c38e0a54b2ced32570056e Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Wed, 18 Sep 2019 17:13:58 -0700 Subject: [PATCH] Increase coverage. --- authority/provisioner/oidc_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authority/provisioner/oidc_test.go b/authority/provisioner/oidc_test.go index f18b96ff..daa878c4 100644 --- a/authority/provisioner/oidc_test.go +++ b/authority/provisioner/oidc_test.go @@ -101,6 +101,8 @@ func TestOIDC_Init(t *testing.T) { {"no-configuration", fields{"oidc", "name", "client-id", "client-secret", "", nil, nil, nil}, args{config}, true}, {"bad-configuration", fields{"oidc", "name", "client-id", "client-secret", srv.URL + "/random", nil, nil, nil}, args{config}, true}, {"bad-claims", fields{"oidc", "name", "client-id", "client-secret", srv.URL + "/.well-known/openid-configuration", badClaims, nil, nil}, args{config}, true}, + {"bad-parse-url", fields{"oidc", "name", "client-id", "client-secret", ":", nil, nil, nil}, args{config}, true}, + {"bad-get-url", fields{"oidc", "name", "client-id", "client-secret", "https://", nil, nil, nil}, args{config}, true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -114,6 +116,7 @@ func TestOIDC_Init(t *testing.T) { } if err := p.Init(tt.args.config); (err != nil) != tt.wantErr { t.Errorf("OIDC.Init() error = %v, wantErr %v", err, tt.wantErr) + return } if tt.wantErr == false { assert.Len(t, 2, p.keyStore.keySet.Keys)