Skip to content

Commit

Permalink
Metricbeat fix imports in magefile (elastic#16214)
Browse files Browse the repository at this point in the history
* fix magefile

* try pip upgrade

* fix failed test for Enroll
  • Loading branch information
michalpristas authored Feb 12, 2020
1 parent 93a6f77 commit 888beee
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,15 @@ addons:

before_install:
- python --version
# - sudo pip install -U pip
- umask 022
- chmod -R go-w $GOPATH/src/github.com/elastic/beats
# Docker-compose installation
- sudo rm /usr/local/bin/docker-compose || true
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- if [ $TRAVIS_OS_NAME = osx ]; then pip install virtualenv; fi
- if [ $TRAVIS_OS_NAME = osx ]; then pip install virtualenv==16.7.9; fi


# Skips installations step
Expand Down
4 changes: 2 additions & 2 deletions x-pack/agent/pkg/agent/application/enroll_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestEnroll(t *testing.T) {
},
))

t.Run("succesfully enroll with TLS and save access api key in the store", withTLSServer(
t.Run("successfully enroll with TLS and save access api key in the store", withTLSServer(
func(t *testing.T) *http.ServeMux {
mux := http.NewServeMux()
mux.HandleFunc("/api/fleet/agents/enroll", func(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -156,7 +156,7 @@ func TestEnroll(t *testing.T) {
},
))

t.Run("succesfully enroll without TLS and save access api key in the store", withServer(
t.Run("successfully enroll without TLS and save access api key in the store", withServer(
func(t *testing.T) *http.ServeMux {
mux := http.NewServeMux()
mux.HandleFunc("/api/fleet/agents/enroll", func(w http.ResponseWriter, r *http.Request) {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/agent/pkg/reporter/fleet/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package fleet

// ManagementConfig is a configuration describing fleet connected parts
type ManagementConfig struct {
Threshold int `config:"threshold" validate:"min=1"`
ReportingCheckFrequency int `config:"check_frequency_sec" validate:"min=1"`
Threshold int `yaml:"threshold" config:"threshold" validate:"min=1"`
ReportingCheckFrequency int `yaml:"check_frequency_sec" config:"check_frequency_sec" validate:"min=1"`
}

// DefaultFleetManagementConfig initiates FleetManagementConfig with default values
Expand Down
1 change: 1 addition & 0 deletions x-pack/metricbeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package main
import (
"context"
"fmt"
"os"
"time"

"github.com/magefile/mage/mg"
Expand Down

0 comments on commit 888beee

Please sign in to comment.