Switch to kingpin flags (#639)
* Switch to kingpin flags * Fix logrus vendoring * Fix flags in main tests * Fix vendoring versions
This commit is contained in:
parent
1467d845fb
commit
dfe07eaae8
84 changed files with 9904 additions and 196 deletions
|
|
@ -14,13 +14,14 @@
|
|||
package collector
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"io/ioutil"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/prometheus/common/log"
|
||||
"gopkg.in/alecthomas/kingpin.v2"
|
||||
)
|
||||
|
||||
func TestParseTextFiles(t *testing.T) {
|
||||
|
|
@ -49,7 +50,8 @@ func TestParseTextFiles(t *testing.T) {
|
|||
|
||||
// Suppress a log message about `nonexistent_path` not existing, this is
|
||||
// expected and clutters the test output.
|
||||
err := flag.Set("log.level", "fatal")
|
||||
log.AddFlags(kingpin.CommandLine)
|
||||
_, err := kingpin.CommandLine.Parse([]string{"--log.level", "fatal"})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue