github.com/diptanu/nomad@v0.5.7-0.20170516172507-d72e86cbe3d9/helper/discover/discover_nomad_testing.go (about)

     1  // +build nomad_test
     2  
     3  package discover
     4  
     5  import "path/filepath"
     6  
     7  // When running tests we do not want to return the test binary that is running
     8  // so we filter it and force discovery via the other mechanisms. Any test that
     9  // fork/execs Nomad should be run with `-tags nomad_test`.
    10  func isNomad(path, nomadExe string) bool {
    11  	if filepath.Base(path) == nomadExe {
    12  		return true
    13  	}
    14  
    15  	return false
    16  }