mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 10:00:11 +00:00
Some checks failed
Post / images (amd64, placement) (push) Failing after 50s
Post / images (amd64, registration) (push) Failing after 41s
Post / images (amd64, registration-operator) (push) Failing after 40s
Post / images (amd64, work) (push) Failing after 44s
Post / images (arm64, addon-manager) (push) Failing after 41s
Post / images (arm64, placement) (push) Failing after 42s
Post / images (arm64, registration) (push) Failing after 41s
Post / images (amd64, addon-manager) (push) Failing after 5m29s
Post / images (arm64, registration-operator) (push) Failing after 43s
Post / images (arm64, work) (push) Failing after 5m35s
Post / image manifest (addon-manager) (push) Has been skipped
Post / image manifest (placement) (push) Has been skipped
Post / image manifest (registration) (push) Has been skipped
Post / image manifest (registration-operator) (push) Has been skipped
Post / image manifest (work) (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Post / coverage (push) Failing after 40m4s
Scorecard supply-chain security / Scorecard analysis (push) Failing after 4m1s
Signed-off-by: Yang Le <yangle@redhat.com>
34 lines
908 B
Go
34 lines
908 B
Go
package testing
|
|
|
|
import (
|
|
"context"
|
|
|
|
"open-cluster-management.io/ocm/pkg/registration/register"
|
|
)
|
|
|
|
// TestAddonAuthConfig is a simple implementation of AddonAuthConfig for testing
|
|
type TestAddonAuthConfig struct {
|
|
KubeClientAuth string
|
|
CSROption register.CSRConfiguration
|
|
TokenOption register.TokenConfiguration
|
|
}
|
|
|
|
func (t *TestAddonAuthConfig) GetKubeClientAuth() string {
|
|
return t.KubeClientAuth
|
|
}
|
|
|
|
func (t *TestAddonAuthConfig) GetCSRConfiguration() register.CSRConfiguration {
|
|
return t.CSROption
|
|
}
|
|
|
|
func (t *TestAddonAuthConfig) GetTokenConfiguration() register.TokenConfiguration {
|
|
return t.TokenOption
|
|
}
|
|
|
|
// MockTokenControl is a simple mock implementation of TokenControl for testing
|
|
type MockTokenControl struct{}
|
|
|
|
func (m *MockTokenControl) CreateToken(ctx context.Context, serviceAccountName, namespace string, expirationSeconds int64) (string, error) {
|
|
return "mock-token", nil
|
|
}
|