config/source/cli: fix tests (#1179)
* config/source/cli: fix tests * skip mdns test in travis Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
		| @@ -17,7 +17,7 @@ func TestCliSourceDefault(t *testing.T) { | |||||||
|  |  | ||||||
| 	service := micro.NewService( | 	service := micro.NewService( | ||||||
| 		micro.Flags( | 		micro.Flags( | ||||||
| 			// to be able to run insude go test | 			// to be able to run inside go test | ||||||
| 			&cli.StringFlag{ | 			&cli.StringFlag{ | ||||||
| 				Name: "test.timeout", | 				Name: "test.timeout", | ||||||
| 			}, | 			}, | ||||||
| @@ -27,6 +27,9 @@ func TestCliSourceDefault(t *testing.T) { | |||||||
| 			&cli.StringFlag{ | 			&cli.StringFlag{ | ||||||
| 				Name: "test.run", | 				Name: "test.run", | ||||||
| 			}, | 			}, | ||||||
|  | 			&cli.StringFlag{ | ||||||
|  | 				Name: "test.testlogfile", | ||||||
|  | 			}, | ||||||
| 			&cli.StringFlag{ | 			&cli.StringFlag{ | ||||||
| 				Name:    "flag", | 				Name:    "flag", | ||||||
| 				Usage:   "It changes something", | 				Usage:   "It changes something", | ||||||
|   | |||||||
| @@ -7,6 +7,11 @@ import ( | |||||||
| ) | ) | ||||||
|  |  | ||||||
| func TestMDNS(t *testing.T) { | func TestMDNS(t *testing.T) { | ||||||
|  | 	// skip test in travis because of sendto: operation not permitted error | ||||||
|  | 	if travis := os.Getenv("TRAVIS"); travis == "true" { | ||||||
|  | 		t.Skip() | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	testData := []*Service{ | 	testData := []*Service{ | ||||||
| 		{ | 		{ | ||||||
| 			Name:    "test1", | 			Name:    "test1", | ||||||
|   | |||||||
| @@ -7,6 +7,10 @@ import ( | |||||||
| ) | ) | ||||||
|  |  | ||||||
| func TestWatcher(t *testing.T) { | func TestWatcher(t *testing.T) { | ||||||
|  | 	if travis := os.Getenv("TRAVIS"); travis == "true" { | ||||||
|  | 		t.Skip() | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	testData := []*Service{ | 	testData := []*Service{ | ||||||
| 		{ | 		{ | ||||||
| 			Name:    "test1", | 			Name:    "test1", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user