@@ -177,153 +177,3 @@ var _ = ginkgo.Describe("[Etna AddRemove Validator SOV L1 Manager PoS]", func()
177177 commands .DeleteSubnetConfig (utils .BlockchainName )
178178 })
179179})
180-
181- var _ = ginkgo .Describe ("[Etna AddRemove Validator SOV External Manager PoS]" , func () {
182- ginkgo .It ("Create Etna Subnet Config" , func () {
183- _ , avagoVersion = commands .CreateEtnaSubnetEvmConfig (
184- utils .BlockchainName ,
185- ewoqEVMAddress ,
186- commands .PoS ,
187- )
188- })
189-
190- ginkgo .It ("Can create an Etna Local Network" , func () {
191- output := commands .StartNetworkWithVersion (avagoVersion )
192- fmt .Println (output )
193- })
194-
195- ginkgo .It ("Can create a local node connected to Etna Local Network" , func () {
196- output , err := commands .CreateLocalEtnaNode (
197- avagoVersion ,
198- utils .TestLocalNodeName ,
199- 7 ,
200- )
201- gomega .Expect (err ).Should (gomega .BeNil ())
202- fmt .Println (output )
203- localClusterUris , err = utils .GetLocalClusterUris ()
204- gomega .Expect (err ).Should (gomega .BeNil ())
205- gomega .Expect (len (localClusterUris )).Should (gomega .Equal (7 ))
206- })
207-
208- ginkgo .It ("Deploy Etna Subnet" , func () {
209- output , err := commands .DeployEtnaBlockchain (
210- utils .BlockchainName ,
211- utils .TestLocalNodeName ,
212- []string {
213- localClusterUris [0 ],
214- localClusterUris [1 ],
215- localClusterUris [2 ],
216- localClusterUris [3 ],
217- localClusterUris [4 ],
218- },
219- ewoqPChainAddress ,
220- true , // convertOnly
221- true , // externalManager
222- )
223- gomega .Expect (err ).Should (gomega .BeNil ())
224- fmt .Println (output )
225- })
226-
227- ginkgo .It ("Can make cluster track a subnet" , func () {
228- output , err := commands .TrackLocalEtnaSubnet (utils .TestLocalNodeName , utils .BlockchainName )
229- gomega .Expect (err ).Should (gomega .BeNil ())
230- fmt .Println (output )
231- // parse blockchainID from output
232- re := regexp .MustCompile (`Waiting for blockchain ([A-Za-z0-9]+) to be bootstrapped` )
233- // Find the first match
234- match := re .FindStringSubmatch (output )
235- gomega .Expect (match ).ToNot (gomega .BeEmpty ())
236- if len (match ) > 1 {
237- // The first submatch will contain the chain ID
238- blockchainID = match [1 ]
239- }
240- gomega .Expect (blockchainID ).Should (gomega .Not (gomega .BeEmpty ()))
241- ginkgo .GinkgoWriter .Printf ("Blockchain ID: %s\n " , blockchainID )
242- })
243-
244- ginkgo .It ("Can initialize a PoS Manager contract" , func () {
245- output , err := commands .InitValidatorManager (
246- utils .BlockchainName ,
247- utils .TestLocalNodeName ,
248- "" ,
249- blockchainID ,
250- )
251- gomega .Expect (err ).Should (gomega .BeNil ())
252- fmt .Println (output )
253- })
254-
255- ginkgo .It ("Can add validator" , func () {
256- output , err := commands .AddEtnaSubnetValidatorToCluster (
257- utils .TestLocalNodeName ,
258- utils .BlockchainName ,
259- localClusterUris [5 ],
260- ewoqPChainAddress ,
261- 1 ,
262- false , // use existing
263- )
264- gomega .Expect (err ).Should (gomega .BeNil ())
265- fmt .Println (output )
266- })
267-
268- ginkgo .It ("Can add second validator" , func () {
269- output , err := commands .AddEtnaSubnetValidatorToCluster (
270- utils .TestLocalNodeName ,
271- utils .BlockchainName ,
272- localClusterUris [6 ],
273- ewoqPChainAddress ,
274- 1 ,
275- false , // use existing
276- )
277- gomega .Expect (err ).Should (gomega .BeNil ())
278- fmt .Println (output )
279- })
280-
281- ginkgo .It ("Can get status of thecluster" , func () {
282- output , err := commands .GetLocalClusterStatus (utils .TestLocalNodeName , utils .BlockchainName )
283- gomega .Expect (err ).Should (gomega .BeNil ())
284- fmt .Println (output )
285- // make sure we can find string with "http://127.0.0.1:port" and "L1:Validating" string in the output
286- parsedURL , err := url .Parse (localClusterUris [1 ])
287- gomega .Expect (err ).Should (gomega .BeNil ())
288- port := parsedURL .Port ()
289- gomega .Expect (port ).Should (gomega .Not (gomega .BeEmpty ()))
290- regexp := fmt .Sprintf (`http://127\.0\.0\.1:%s.*Validating` , port )
291- gomega .Expect (output ).To (gomega .MatchRegexp (regexp ), fmt .Sprintf ("expect to have L1 validated by port %s" , port ))
292- parsedURL , err = url .Parse (localClusterUris [2 ])
293- gomega .Expect (err ).Should (gomega .BeNil ())
294- port = parsedURL .Port ()
295- gomega .Expect (port ).Should (gomega .Not (gomega .BeEmpty ()))
296- regexp = fmt .Sprintf (`http://127\.0\.0\.1:%s.*Validating` , port )
297- gomega .Expect (output ).To (gomega .MatchRegexp (regexp ), fmt .Sprintf ("expect to have L1 validated by port %s" , port ))
298- })
299-
300- ginkgo .It ("Can sleep for min stake duration" , func () {
301- time .Sleep (3 * time .Minute )
302- })
303-
304- ginkgo .It ("Can remove bootstrap validator" , func () {
305- output , err := commands .RemoveEtnaSubnetValidatorFromCluster (
306- utils .TestLocalNodeName ,
307- utils .BlockchainName ,
308- localClusterUris [2 ],
309- keyName ,
310- 0 ,
311- )
312- gomega .Expect (err ).Should (gomega .BeNil ())
313- fmt .Println (output )
314- })
315-
316- ginkgo .It ("Can destroy local node" , func () {
317- output , err := commands .DestroyLocalNode (utils .TestLocalNodeName )
318- gomega .Expect (err ).Should (gomega .BeNil ())
319- fmt .Println (output )
320- })
321-
322- ginkgo .It ("Can destroy Etna Local Network" , func () {
323- commands .CleanNetwork ()
324- })
325-
326- ginkgo .It ("Can remove Etna Subnet Config" , func () {
327- commands .DeleteSubnetConfig (utils .BlockchainName )
328- })
329- })
0 commit comments