MCPcopy Create free account
hub / github.com/akash-network/provider / TestRAM

Method TestRAM

integration/storageclassram_test.go:25–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25func (s *E2EStorageClassRam) TestRAM() {
26 deploymentPath, err := filepath.Abs("../testdata/deployment/deployment-v2-storage-ram.yaml")
27 s.Require().NoError(err)
28
29 deploymentID := dtypes.DeploymentID{
30 Owner: s.addrTenant.String(),
31 DSeq: uint64(100),
32 }
33
34 cctx := s.cctx
35
36 // Create Deployments
37 res, err := clitestutil.ExecDeploymentCreate(
38 s.ctx,
39 cctx,
40 cli.TestFlags().
41 With(deploymentPath).
42 WithFrom(s.addrTenant.String()).
43 WithDSeq(deploymentID.DSeq).
44 Append(cliFlags)...,
45 )
46 s.Require().NoError(err)
47 s.Require().NoError(s.waitForBlocksCommitted(2))
48 clitestutil.ValidateTxSuccessful(s.ctx, s.T(), cctx, res.Bytes())
49
50 bidID := mtypes.MakeBidID(
51 mtypes.MakeOrderID(dtypes.MakeGroupID(deploymentID, 1), 1),
52 s.addrProvider,
53 )
54
55 err = s.waitForBlockchainEvent(&mtypes.EventBidCreated{ID: bidID})
56 s.Require().NoError(err)
57
58 _, err = clitestutil.ExecQueryBid(s.ctx, cctx, cli.TestFlags().WithBidID(bidID)...)
59 s.Require().NoError(err)
60
61 _, err = clitestutil.ExecCreateLease(
62 s.ctx,
63 cctx,
64 cli.TestFlags().
65 WithBidID(bidID).
66 WithFrom(s.addrTenant.String()).
67 Append(cliFlags)...,
68 )
69 s.Require().NoError(err)
70 s.Require().NoError(s.waitForBlocksCommitted(2))
71 clitestutil.ValidateTxSuccessful(s.ctx, s.T(), cctx, res.Bytes())
72
73 lid := bidID.LeaseID()
74
75 // Send Manifest to Provider ----------------------------------------------
76 _, err = ptestutil.ExecSendManifest(
77 s.ctx,
78 cctx,
79 cli.TestFlags().
80 With(deploymentPath).
81 WithHome(s.validator.ClientCtx.HomeDir).
82 WithFrom(s.addrTenant.String()).

Callers

nothing calls this directly

Calls 8

WithDSeqMethod · 0.80
StringMethod · 0.65
LeaseIDMethod · 0.65
DoneMethod · 0.65
WithLeaseIDMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected