Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed Changes #37

Open
cowfish813 opened this issue Sep 22, 2023 · 0 comments
Open

Proposed Changes #37

cowfish813 opened this issue Sep 22, 2023 · 0 comments

Comments

@cowfish813
Copy link

service/universe_test.go

code contains some code that could be more compartmentalized into a function for easier readability. The err variable is reassigned often and can be challenging to track
eg. lines 96-108

  func TestKillService(t *testing.T) {
	  err := universe.KillService("seer")
  
	  if err != nil {      // should not fail
		  t.Errorf("Failed kill call with error: %v", err)
	  } else { 		  // should fail
		  err = universe.KillService("seer")
		  if err == nil {
			  t.Error("Expected killing seer again to fail")
		  }
	  }
  }

lines 73-94 could also be compartmentalized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant