Add a glog dependency to the test

This commit is contained in:
Justin Santa Barbara 2017-01-03 14:08:31 -05:00
parent 8d31671252
commit 288af117fe
1 changed files with 5 additions and 1 deletions

View File

@ -17,6 +17,7 @@ limitations under the License.
package featureflag
import (
"github.com/golang/glog"
"os"
"testing"
)
@ -27,6 +28,9 @@ func TestFlagToFalse(t *testing.T) {
t.Fatalf("Flag did not default true")
}
// Really just to force a dependency on glog, so that we can pass -v and -logtostderr to go test
glog.Infof("Created flag Unittest1")
ParseFlags("-UnitTest1")
if f.Enabled() {
t.Fatalf("Flag did not default turn off")
@ -38,7 +42,7 @@ func TestFlagToFalse(t *testing.T) {
}
}
func Setenv(t *testing.T) {
func TestSetenv(t *testing.T) {
f := New("UnitTest2", Bool(true))
if !f.Enabled() {
t.Fatalf("Flag did not default true")