mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-16 06:08:40 +00:00
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m26s
Post / coverage (push) Failing after 39m1s
Post / images (amd64) (push) Failing after 8m21s
Post / images (arm64) (push) Failing after 7m47s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 47s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
24 lines
564 B
Go
24 lines
564 B
Go
package webhook
|
|
|
|
import (
|
|
"testing"
|
|
|
|
ocmfeature "open-cluster-management.io/api/feature"
|
|
|
|
commonoptions "open-cluster-management.io/ocm/pkg/common/options"
|
|
"open-cluster-management.io/ocm/pkg/features"
|
|
)
|
|
|
|
func TestOptions_SetupWebhookServer(t *testing.T) {
|
|
opts := commonoptions.NewWebhookOptions()
|
|
err := features.HubMutableFeatureGate.Add(ocmfeature.DefaultHubWorkFeatureGates)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
o := NewOptions()
|
|
err = o.SetupWebhookServer(opts)
|
|
if err != nil {
|
|
t.Errorf("SetupWebhookServer() error = %v, wantErr %v", err, nil)
|
|
}
|
|
}
|