Last active
August 29, 2015 14:16
-
-
Save mindscratch/6168a495bc83783dfb2e to your computer and use it in GitHub Desktop.
golang integration test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "testing" | |
| import "time" | |
| import "fmt" | |
| func TestBar(t *testing.T) { | |
| fmt.Println("FOO sleeping") | |
| time.Sleep(time.Second) | |
| fmt.Println("FOO done") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // +build integration | |
| // the blank line after the build constraints is required | |
| package main | |
| import "testing" | |
| import "time" | |
| import "fmt" | |
| func TestBar(t *testing.T) { | |
| fmt.Println("BAR sleeping") | |
| time.Sleep(time.Second) | |
| fmt.Println("BAR done") | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment