Skip to content

Commit

Permalink
Remove prints, update test
Browse files Browse the repository at this point in the history
  • Loading branch information
matoval committed Oct 31, 2024
1 parent 4f6d051 commit e475c48
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
4 changes: 0 additions & 4 deletions pkg/types/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
3 changes: 0 additions & 3 deletions pkg/workceptor/remote_work.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/workceptor/workceptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e475c48

Please sign in to comment.