File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 15
15
package removedapis
16
16
17
17
import (
18
+ "context"
18
19
"fmt"
19
20
"testing"
20
21
"time"
@@ -50,6 +51,19 @@ func (s *plansRemovedAPIsSuite) SetupTest() {
50
51
s .Require ().NoError (aptest .WaitForCRDByName (ctx , client , "removedcrds" ))
51
52
52
53
s .PutFile (s .ControllerNode (0 ), "/var/lib/k0s/manifests/removedapis-test/resource.yaml" , removedResource )
54
+ // Wait to see the CR created on API
55
+ kc , err := s .KubeClient (s .ControllerNode (0 ))
56
+ s .Require ().NoError (err )
57
+ apiPath := "/apis/autopilot.k0sproject.io/v1beta1/namespaces/default/removedcrds/removed-resource"
58
+ s .T ().Log ("Waiting for the removed resource CR to be created on the API..." )
59
+ err = common .Poll (ctx , func (ctx context.Context ) (done bool , err error ) {
60
+ result := kc .RESTClient ().Get ().AbsPath (apiPath ).Do (ctx )
61
+ if result .Error () != nil {
62
+ return false , nil
63
+ }
64
+ return true , nil
65
+ })
66
+ s .Require ().NoError (err )
53
67
54
68
s .Require ().NoError (aptest .WaitForCRDByName (ctx , client , "plans" ))
55
69
s .Require ().NoError (aptest .WaitForCRDByName (ctx , client , "controlnodes" ))
@@ -103,6 +117,8 @@ spec:
103
117
platforms:
104
118
linux-amd64:
105
119
url: http://localhost/dist/k0s
120
+ linux-arm64:
121
+ url: http://localhost/dist/k0s
106
122
targets:
107
123
controllers:
108
124
discovery:
You can’t perform that action at this time.
0 commit comments