Remove test/integration/* from hack/.golint_failures
This commit is contained in:
@@ -228,7 +228,7 @@ var aBinding string = `
|
||||
}
|
||||
`
|
||||
|
||||
var emptyEndpoints string = `
|
||||
var emptyEndpoints = `
|
||||
{
|
||||
"kind": "Endpoints",
|
||||
"apiVersion": "v1",
|
||||
@@ -493,10 +493,10 @@ func parseResourceVersion(response []byte) (string, float64, error) {
|
||||
}
|
||||
|
||||
func getPreviousResourceVersionKey(url, id string) string {
|
||||
baseUrl := strings.Split(url, "?")[0]
|
||||
key := baseUrl
|
||||
baseURL := strings.Split(url, "?")[0]
|
||||
key := baseURL
|
||||
if id != "" {
|
||||
key = fmt.Sprintf("%s/%v", baseUrl, id)
|
||||
key = fmt.Sprintf("%s/%v", baseURL, id)
|
||||
}
|
||||
return key
|
||||
}
|
||||
@@ -1075,8 +1075,8 @@ func TestKindAuthorization(t *testing.T) {
|
||||
if r.verb == "PUT" && r.body != "" {
|
||||
// For update operations, insert previous resource version
|
||||
if resVersion := previousResourceVersion[getPreviousResourceVersionKey(r.URL, "")]; resVersion != 0 {
|
||||
resourceVersionJson := fmt.Sprintf(",\r\n\"resourceVersion\": \"%v\"", resVersion)
|
||||
bodyStr = fmt.Sprintf(r.body, resourceVersionJson)
|
||||
resourceVersionJSON := fmt.Sprintf(",\r\n\"resourceVersion\": \"%v\"", resVersion)
|
||||
bodyStr = fmt.Sprintf(r.body, resourceVersionJSON)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ func (b bootstrapSecrets) Get(name string) (*corev1.Secret, error) {
|
||||
|
||||
// TestBootstrapTokenAuth tests the bootstrap token auth provider
|
||||
func TestBootstrapTokenAuth(t *testing.T) {
|
||||
tokenId, err := bootstraputil.GenerateTokenId()
|
||||
tokenID, err := bootstraputil.GenerateTokenId()
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
@@ -62,7 +62,7 @@ func TestBootstrapTokenAuth(t *testing.T) {
|
||||
},
|
||||
Type: corev1.SecretTypeBootstrapToken,
|
||||
Data: map[string][]byte{
|
||||
bootstrapapi.BootstrapTokenIDKey: []byte(tokenId),
|
||||
bootstrapapi.BootstrapTokenIDKey: []byte(tokenID),
|
||||
bootstrapapi.BootstrapTokenSecretKey: []byte(secret),
|
||||
bootstrapapi.BootstrapTokenUsageAuthentication: []byte("true"),
|
||||
},
|
||||
@@ -74,7 +74,7 @@ func TestBootstrapTokenAuth(t *testing.T) {
|
||||
},
|
||||
Type: corev1.SecretTypeBootstrapToken,
|
||||
Data: map[string][]byte{
|
||||
bootstrapapi.BootstrapTokenIDKey: []byte(tokenId),
|
||||
bootstrapapi.BootstrapTokenIDKey: []byte(tokenID),
|
||||
bootstrapapi.BootstrapTokenSecretKey: []byte("invalid"),
|
||||
bootstrapapi.BootstrapTokenUsageAuthentication: []byte("true"),
|
||||
},
|
||||
@@ -86,7 +86,7 @@ func TestBootstrapTokenAuth(t *testing.T) {
|
||||
},
|
||||
Type: corev1.SecretTypeBootstrapToken,
|
||||
Data: map[string][]byte{
|
||||
bootstrapapi.BootstrapTokenIDKey: []byte(tokenId),
|
||||
bootstrapapi.BootstrapTokenIDKey: []byte(tokenID),
|
||||
bootstrapapi.BootstrapTokenSecretKey: []byte("invalid"),
|
||||
bootstrapapi.BootstrapTokenUsageAuthentication: []byte("true"),
|
||||
bootstrapapi.BootstrapTokenExpirationKey: []byte(bootstraputil.TimeStringFromNow(-time.Hour)),
|
||||
@@ -134,7 +134,7 @@ func TestBootstrapTokenAuth(t *testing.T) {
|
||||
previousResourceVersion := make(map[string]float64)
|
||||
transport := http.DefaultTransport
|
||||
|
||||
token := tokenId + "." + secret
|
||||
token := tokenID + "." + secret
|
||||
var bodyStr string
|
||||
if test.request.body != "" {
|
||||
sub := ""
|
||||
|
Reference in New Issue
Block a user