diff --git a/internal/server/exploits/server_test.go b/internal/server/exploits/server_test.go index 26deb2b..a25eec2 100644 --- a/internal/server/exploits/server_test.go +++ b/internal/server/exploits/server_test.go @@ -10,6 +10,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/require" "google.golang.org/protobuf/testing/protocmp" + "google.golang.org/protobuf/types/known/durationpb" "github.com/c4t-but-s4d/neo/v2/internal/server/config" "github.com/c4t-but-s4d/neo/v2/pkg/hostbucket" @@ -40,6 +41,8 @@ func TestServer_UpdateExploit(t *testing.T) { cfg := &epb.ExploitConfiguration{ Entrypoint: "bin", IsArchive: false, + Timeout: durationpb.New(time.Minute), + RunEvery: durationpb.New(time.Minute), } r := &epb.UpdateExploitRequest{ State: &epb.ExploitState{ @@ -50,6 +53,9 @@ func TestServer_UpdateExploit(t *testing.T) { } resp, err := es.UpdateExploit(context.Background(), r) require.NoError(t, err) + + cfg.Timeout = durationpb.New(2 * time.Minute) + cfg.RunEvery = durationpb.New(2 * time.Minute) want := &epb.ExploitState{ ExploitId: "1", Version: 1, @@ -67,6 +73,8 @@ func TestServer_Exploit(t *testing.T) { cfg := &epb.ExploitConfiguration{ Entrypoint: "bin", IsArchive: false, + Timeout: durationpb.New(time.Minute), + RunEvery: durationpb.New(time.Minute), } state := &epb.ExploitState{ ExploitId: "1", @@ -99,6 +107,8 @@ func TestServer_Ping(t *testing.T) { cfg := &epb.ExploitConfiguration{ Entrypoint: "bin", IsArchive: false, + Timeout: durationpb.New(time.Minute), + RunEvery: durationpb.New(time.Minute), } state := &epb.ExploitState{ ExploitId: "1",