From e475c481c7abd01525b77e41191a91b01da84eca Mon Sep 17 00:00:00 2001 From: matoval Date: Wed, 30 Oct 2024 17:35:46 -0700 Subject: [PATCH] Remove prints, update test --- pkg/types/main.go | 4 ---- pkg/workceptor/remote_work.go | 3 --- pkg/workceptor/workceptor_test.go | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/pkg/types/main.go b/pkg/types/main.go index 3515cf4eb..85ef8a7f2 100644 --- a/pkg/types/main.go +++ b/pkg/types/main.go @@ -38,10 +38,6 @@ func (cfg NodeCfg) Init() error { } else { submitIDRegex := regexp.MustCompile(`^[.\-_a-zA-Z0-9]*$`) match := submitIDRegex.FindSubmatch([]byte(cfg.ID)) - for _, m := range match { - fmt.Println("HERE: " + string(m)) - fmt.Println(cfg.ID) - } if match == nil { return fmt.Errorf("node id can only contain a-z, A-Z, 0-9 or special characters . - _ but received: %s", cfg.ID) } diff --git a/pkg/workceptor/remote_work.go b/pkg/workceptor/remote_work.go index 2ca646def..9d455121e 100644 --- a/pkg/workceptor/remote_work.go +++ b/pkg/workceptor/remote_work.go @@ -183,9 +183,6 @@ func (rw *remoteUnit) startRemoteUnit(ctx context.Context, conn net.Conn, reader } submitIDRegex := regexp.MustCompile(`([.\-_a-zA-Z0-9]+)~([a-zA-Z0-9]+){8}`) match := submitIDRegex.FindSubmatch([]byte(response)) - for _, m := range match { - fmt.Println("HERE: " + string(m)) - } if match == nil || len(match) != 3 { return fmt.Errorf("could not parse response: %s", strings.TrimRight(response, "\n")) } diff --git a/pkg/workceptor/workceptor_test.go b/pkg/workceptor/workceptor_test.go index d67ec6a79..b3fb02de9 100644 --- a/pkg/workceptor/workceptor_test.go +++ b/pkg/workceptor/workceptor_test.go @@ -48,7 +48,7 @@ func TestAllocateUnit(t *testing.T) { return mockWorkUnit } - mockNetceptor.EXPECT().NodeID().Return("test") + mockNetceptor.EXPECT().NodeID().Return("test").Times(4) w, err := workceptor.New(ctx, mockNetceptor, "/tmp") if err != nil { t.Errorf("Error while creating Workceptor: %v", err)