@@ -4,15 +4,16 @@ import (
44 "bytes"
55 "context"
66 "encoding/json"
7+ "reflect"
8+ "testing"
9+
710 configv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1"
811 testlibrary "github.com/openshift/library-go/test/library"
912 "github.com/stretchr/testify/require"
1013 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1114 "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
1215 "k8s.io/apimachinery/pkg/util/wait"
1316 clientcorev1 "k8s.io/client-go/kubernetes/typed/core/v1"
14- "reflect"
15- "testing"
1617
1718 "github.com/openshift/cluster-kube-apiserver-operator/pkg/operator/operatorclient"
1819)
@@ -30,21 +31,21 @@ func TestServiceAccountIssuer(t *testing.T) {
3031 t .Run ("serviceaccountissuer set in authentication config results in apiserver config" , func (t * testing.T ) {
3132 setServiceAccountIssuer (t , authConfigClient , "https://first.foo.bar" )
3233 if err := pollForOperandIssuer (t , kubeClient , []string {"https://first.foo.bar" , "https://kubernetes.default.svc" }); err != nil {
33- t .Errorf (err . Error () )
34+ t .Errorf ("pollForOperandIssuer failed: %v" , err )
3435 }
3536 })
3637
3738 t .Run ("second serviceaccountissuer set in authentication config results in apiserver config with two issuers" , func (t * testing.T ) {
3839 setServiceAccountIssuer (t , authConfigClient , "https://second.foo.bar" )
3940 if err := pollForOperandIssuer (t , kubeClient , []string {"https://second.foo.bar" , "https://first.foo.bar" , "https://kubernetes.default.svc" }); err != nil {
40- t .Errorf (err . Error () )
41+ t .Errorf ("pollForOperandIssuer failed: %v" , err )
4142 }
4243 })
4344
4445 t .Run ("no serviceaccountissuer set in authentication config results in apiserver config with default issuer set" , func (t * testing.T ) {
4546 setServiceAccountIssuer (t , authConfigClient , "" )
4647 if err := pollForOperandIssuer (t , kubeClient , []string {"https://kubernetes.default.svc" }); err != nil {
47- t .Errorf (err . Error () )
48+ t .Errorf ("pollForOperandIssuer failed: %v" , err )
4849 }
4950 })
5051
0 commit comments