Skip to content

Commit

Permalink
seems deploy is fine now
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed Feb 3, 2023
1 parent 833acff commit 39a7d58
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion cluster/calcium/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func (c *Calcium) ConnectNetwork(ctx context.Context, network, target, ipv4, ipv
logger := log.WithFunc("calcium.ConnectNetwork").WithField("network", network).WithField("target", target).WithField("ipv4", ipv4).WithField("ipv6", ipv6)
workload, err := c.GetWorkload(ctx, target)
if err != nil {
logger.Error(ctx, err)
return nil, err
}

Expand Down
1 change: 0 additions & 1 deletion engine/mocks/fakeengine/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func MakeClient(ctx context.Context, config coretypes.Config, nodename, endpoint
e.On("VirtualizationResize", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil)
e.On("VirtualizationWait", mock.Anything, mock.Anything, mock.Anything).Return(&enginetypes.VirtualizationWaitResult{Message: "", Code: 0}, nil)
e.On("VirtualizationUpdateResource", mock.Anything, mock.Anything, mock.Anything).Return(nil)

e.On("VirtualizationCopyFrom", mock.Anything, mock.Anything, mock.Anything).Return([]byte("d1...\nd2...\n"), 0, 0, int64(0), nil)
// e.On("ResourceValidate", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil)
return e, nil
Expand Down
4 changes: 2 additions & 2 deletions resource/cobalt/alloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func (m Manager) Alloc(ctx context.Context, nodename string, deployCount int, op
logger := log.WithFunc("resource.coblat.Alloc")

// index -> no, map by plugin name
workloadsParams := []types.Resources{}
engineParams := []types.Resources{}
workloadsParams := make([]types.Resources, deployCount)
engineParams := make([]types.Resources, deployCount)

// init engine args
for i := 0; i < deployCount; i++ {
Expand Down
2 changes: 1 addition & 1 deletion store/etcdv3/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func TestGetNodesByPod(t *testing.T) {
assert.NoError(t, err)
ns, err = m.GetNodesByPod(ctx, &types.NodeFilter{All: false})
assert.NoError(t, err)
assert.Empty(t, ns)
assert.Len(t, ns, 1) // because mock forced to up, so here is 1
ns, err = m.GetNodesByPod(ctx, &types.NodeFilter{All: true})
assert.NoError(t, err)
assert.NotEmpty(t, ns)
Expand Down
2 changes: 1 addition & 1 deletion store/redis/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (s *RediaronTestSuite) TestGetNodesByPod() {
s.NoError(err)
ns, err = s.rediaron.GetNodesByPod(ctx, &types.NodeFilter{All: false})
s.NoError(err)
s.Empty(ns)
s.Len(ns, 1) // because mock forced to up, so here is 1
ns, err = s.rediaron.GetNodesByPod(ctx, &types.NodeFilter{All: true})
s.NoError(err)
s.NotEmpty(ns)
Expand Down

0 comments on commit 39a7d58

Please sign in to comment.