@@ -52,57 +52,6 @@ func addKnownTypesToScheme(scheme *runtime.Scheme) {
5252 scheme .AddKnownTypes (configv1 .GroupVersion , & configv1.ClusterVersion {})
5353}
5454
55- func TestRouteAPIFound (t * testing.T ) {
56- t .Run ("Route API not found by default" , func (t * testing.T ) {
57- defer SetRouteAPIFound (false )
58- SetRouteAPIFound (false )
59- if IsRouteAPIFound () {
60- t .Fatal ("expected Route API to not be found" )
61- }
62- })
63- t .Run ("SetRouteAPIFound sets the value" , func (t * testing.T ) {
64- defer SetRouteAPIFound (false )
65- SetRouteAPIFound (true )
66- if ! IsRouteAPIFound () {
67- t .Fatal ("expected Route API to be found after SetRouteAPIFound(true)" )
68- }
69- })
70- }
71-
72- func TestOpenShiftClusterFound (t * testing.T ) {
73- t .Run ("OpenShift cluster not found by default" , func (t * testing.T ) {
74- defer SetOpenShiftClusterFound (false )
75- SetOpenShiftClusterFound (false )
76- if IsOpenShiftCluster () {
77- t .Fatal ("expected OpenShift cluster to not be found" )
78- }
79- })
80- t .Run ("SetOpenShiftClusterFound sets the value" , func (t * testing.T ) {
81- defer SetOpenShiftClusterFound (false )
82- SetOpenShiftClusterFound (true )
83- if ! IsOpenShiftCluster () {
84- t .Fatal ("expected OpenShift cluster to be found after SetOpenShiftClusterFound(true)" )
85- }
86- })
87- }
88-
89- func TestConsoleAPIFound (t * testing.T ) {
90- t .Run ("Console API not found by default" , func (t * testing.T ) {
91- defer SetConsoleAPIFound (false )
92- SetConsoleAPIFound (false )
93- if IsConsoleAPIFound () {
94- t .Fatal ("expected Console API to not be found" )
95- }
96- })
97- t .Run ("SetConsoleAPIFound sets the value" , func (t * testing.T ) {
98- defer SetConsoleAPIFound (false )
99- SetConsoleAPIFound (true )
100- if ! IsConsoleAPIFound () {
101- t .Fatal ("expected Console API to be found after SetConsoleAPIFound(true)" )
102- }
103- })
104- }
105-
10655func assertNoError (t * testing.T , err error ) {
10756 t .Helper ()
10857 if err != nil {
0 commit comments