Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
kata-agent: Remove GRPCSock unused variable.
Browse files Browse the repository at this point in the history
We already save the URL used to connect to the agent in the `state.URL` this
variable is the used to connect the shim to agnet independently the socket type
(VSOCK or serial)

Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
  • Loading branch information
jcvenegas authored and Julio Montes committed Jul 31, 2018
1 parent 9b28325 commit f389b94
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion virtcontainers/kata_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ var (
// KataAgentConfig is a structure storing information needed
// to reach the Kata Containers agent.
type KataAgentConfig struct {
GRPCSocket string
LongLiveConn bool
}

Expand Down
5 changes: 1 addition & 4 deletions virtcontainers/kata_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -671,13 +671,11 @@ func TestAgentPathAPI(t *testing.T) {
assert.Nil(err)
assert.Equal(k1, k2)

c.GRPCSocket = "unixsocket"
err = k1.generateVMSocket(id, c)
assert.Nil(err)
_, ok := k1.vmSocket.(Socket)
assert.True(ok)

c.GRPCSocket = "vsock:100:200"
err = k2.generateVMSocket(id, c)
assert.Nil(err)
_, ok = k2.vmSocket.(kataVSOCK)
Expand All @@ -692,7 +690,7 @@ func TestAgentConfigure(t *testing.T) {

k := &kataAgent{}
h := &mockHypervisor{}
c := KataAgentConfig{GRPCSocket: "vsock:100:200"}
c := KataAgentConfig{}
id := "foobar"

invalidAgent := HyperConfig{}
Expand All @@ -702,7 +700,6 @@ func TestAgentConfigure(t *testing.T) {
err = k.configure(h, id, dir, true, c)
assert.Nil(err)

c.GRPCSocket = "foobarfoobar"
err = k.configure(h, id, dir, true, c)
assert.Nil(err)

Expand Down

0 comments on commit f389b94

Please sign in to comment.