kata-agent: Remove GRPCSock unused variable.

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 <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
Jose Carlos Venegas Munoz 2018-07-19 14:53:53 -05:00 committed by Julio Montes
parent 9b283254c3
commit f389b94d8a
2 changed files with 1 additions and 5 deletions

View File

@ -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
}

View File

@ -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)
@ -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{}
@ -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)