hub.fastgit.org/hashicorp/consul.git@v1.4.5/lib/useragent_test.go (about)

     1  package lib
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestUserAgent(t *testing.T) {
     8  	projectURL = "https://consul-test.com"
     9  	rt = "go5.0"
    10  	versionFunc = func() string { return "1.2.3" }
    11  
    12  	act := UserAgent()
    13  
    14  	exp := "Consul/1.2.3 (+https://consul-test.com; go5.0)"
    15  	if exp != act {
    16  		t.Errorf("expected %q to be %q", act, exp)
    17  	}
    18  }