From 3e28204a46365947b0e2262f871056d04cfd1e65 Mon Sep 17 00:00:00 2001
From: Justin Cormack <justin.cormack@docker.com>
Date: Thu, 25 Jul 2019 14:46:05 +0100
Subject: [PATCH] Call flag.Parse() in testing.

Newer versions of `testing` require that flags are parsed in `TestMain`
before use, including for `go test` command line options.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
---
 cmd/notary/integration_test.go | 2 ++
 1 file changed, 2 insertions(+)

--- a/cmd/notary/integration_test.go
+++ b/cmd/notary/integration_test.go
@@ -13,6 +13,7 @@
 	"crypto/sha512"
 	"crypto/x509"
 	"encoding/hex"
+	"flag"
 	"fmt"
 	"io/ioutil"
 	"net/http"
@@ -1802,6 +1803,7 @@
 }
 
 func TestMain(m *testing.M) {
+	flag.Parse()
 	if testing.Short() {
 		// skip
 		os.Exit(0)
