Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

v2 refactor #1008

Merged
merged 70 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1806d81
Move kibana into internals, update fleet test suite
adam-stokes Apr 12, 2021
ac1ad48
migrate docker-compose related code to internal layout
adam-stokes Apr 12, 2021
c6d685c
move docker related code to internal layout
adam-stokes Apr 12, 2021
790fe23
move git related code to internal layout
adam-stokes Apr 12, 2021
ce361ed
move common attributes into internal common file system layout
adam-stokes Apr 12, 2021
47f3d1e
move elasticsearch specifics into its own filesystem layout
adam-stokes Apr 12, 2021
e23bafe
move installer based code to internal layout
adam-stokes Apr 12, 2021
6e193f8
move shell related code to internal layout
adam-stokes Apr 12, 2021
caae73c
move sanitizer code to internal layout
adam-stokes Apr 12, 2021
2feb193
move io related code to internal layout
adam-stokes Apr 12, 2021
95792f5
move utils into internal layout
adam-stokes Apr 12, 2021
50b691d
Update package integration querying/altering
adam-stokes Apr 12, 2021
2f7d8a2
move curl to internal layout
adam-stokes Apr 12, 2021
23617ef
move helm to internal layout
adam-stokes Apr 12, 2021
2c5165d
move kubectl into internal layout
adam-stokes Apr 12, 2021
5bbb197
move state internal filesystem
adam-stokes Apr 12, 2021
b5ed125
cleanup config in stand-alone
adam-stokes Apr 12, 2021
2a47d9d
remove unused files
adam-stokes Apr 12, 2021
4b82960
Uniquify the stand-alone step for checking agent status (#993)
adam-stokes Apr 6, 2021
9bcc3a7
Remove the agent config file parameters for stand alone (#983)
adam-stokes Apr 12, 2021
edcfd24
Update helm/metricbeat tests to use new layout
adam-stokes Apr 12, 2021
16d0167
Fix policy endpoint update
adam-stokes Apr 12, 2021
bdbc8e0
fix panic on helm init
adam-stokes Apr 12, 2021
9842175
Fix step reference as this being merged seperately
adam-stokes Apr 12, 2021
5d1b136
Update function call to correct standalone step
adam-stokes Apr 13, 2021
272ab50
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 13, 2021
0a50dcf
Fix merge conflict
adam-stokes Apr 13, 2021
76d2832
update ProfileEnv query/set for KibanaVersion
adam-stokes Apr 13, 2021
3bfc90b
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 13, 2021
cfc9ae6
More fixes to agent endpoint security checks
adam-stokes Apr 13, 2021
a90956e
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 13, 2021
f4705a7
update backend feature to call out endpoint in step
adam-stokes Apr 13, 2021
a374704
use common.TimeoutFactor in docker checkprocess state
adam-stokes Apr 13, 2021
ee519ec
Update adding endpoint integration
adam-stokes Apr 14, 2021
747d66f
enable features for fleet server
adam-stokes Apr 14, 2021
dcd394f
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 14, 2021
c74fd49
not necessary to enroll after install
adam-stokes Apr 14, 2021
8edaf97
wait for filebeat/metricbeat before restarts
adam-stokes Apr 15, 2021
1492c21
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 15, 2021
9917863
clear out fts.CurrentToken during beforeScenario
adam-stokes Apr 15, 2021
f67f804
attach system integration on deploy
adam-stokes Apr 15, 2021
cc1f381
enroll if rpm
adam-stokes Apr 15, 2021
c589161
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 16, 2021
8f2bd03
dont store fleet policy
adam-stokes Apr 16, 2021
88c3311
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 16, 2021
89ae59c
Merge branch 'feat-kibana-refactor' of github.com:elastic/e2e-testing…
adam-stokes Apr 16, 2021
956b773
update kibana config for latest fleet server
adam-stokes Apr 16, 2021
5b80d64
Update e2e/_suites/fleet/fleet.go
adam-stokes Apr 16, 2021
ca4a93e
Update e2e/_suites/fleet/fleet.go
adam-stokes Apr 16, 2021
7848f5c
Update e2e/_suites/fleet/fleet.go
adam-stokes Apr 16, 2021
0ad0583
Update .pre-commit-config.yaml
adam-stokes Apr 16, 2021
c7cbd7f
Update e2e/Makefile
adam-stokes Apr 16, 2021
c3a16e8
rename apt -> deb for installer type
adam-stokes Apr 16, 2021
74cae30
maybe sleep will help?
adam-stokes Apr 17, 2021
a93eafe
Revert "maybe sleep will help?"
adam-stokes Apr 17, 2021
bd5e25c
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 19, 2021
2832ac0
execute docker start/stop with timeout between
adam-stokes Apr 19, 2021
7dd0e07
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 19, 2021
911ce1b
fixes fleet_server scenario
adam-stokes Apr 19, 2021
d4ac413
Utilize fleet server in all tests
adam-stokes Apr 19, 2021
4d561fe
Fix enrollment url for fleet server
adam-stokes Apr 20, 2021
6715695
Merge branch 'master' into feat-kibana-refactor
adam-stokes Apr 20, 2021
b43d3e9
Query elasticsearch logs for endpoint security event changes
adam-stokes Apr 20, 2021
9b77822
Increase search result size for ES
adam-stokes Apr 20, 2021
4b395d2
Fix issue with fleet server restarting continuously
adam-stokes Apr 20, 2021
728d927
unpin kibana pr now that most major breakage is resolved
adam-stokes Apr 21, 2021
76605b5
force unenroll
adam-stokes Apr 21, 2021
4a2f459
for new fleet bootstrap on re-enrollment
adam-stokes Apr 21, 2021
3b5a727
Fix unenrollment
adam-stokes Apr 21, 2021
f11ef39
Add timeout safeguard to elastic-agent execution
adam-stokes Apr 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli/cmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"context"

"github.com/elastic/e2e-testing/cli/config"
"github.com/elastic/e2e-testing/cli/services"
"github.com/elastic/e2e-testing/internal/compose"
log "github.com/sirupsen/logrus"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -63,7 +63,7 @@ func buildDeployServiceCommand(srv string) *cobra.Command {
Short: `Deploys a ` + srv + ` service`,
Long: `Deploys a ` + srv + ` service, adding it to a running profile, identified by its name`,
Run: func(cmd *cobra.Command, args []string) {
serviceManager := services.NewServiceManager()
serviceManager := compose.NewServiceManager()

env := map[string]string{}
env = config.PutServiceEnvironment(env, srv, versionToRun)
Expand All @@ -85,7 +85,7 @@ func buildUndeployServiceCommand(srv string) *cobra.Command {
Short: `Undeploys a ` + srv + ` service`,
Long: `Undeploys a ` + srv + ` service, removing it from a running profile, identified by its name`,
Run: func(cmd *cobra.Command, args []string) {
serviceManager := services.NewServiceManager()
serviceManager := compose.NewServiceManager()

env := map[string]string{}
env = config.PutServiceEnvironment(env, srv, versionToRun)
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"

"github.com/elastic/e2e-testing/cli/config"
"github.com/elastic/e2e-testing/cli/services"
"github.com/elastic/e2e-testing/internal/compose"
log "github.com/sirupsen/logrus"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -64,7 +64,7 @@ func buildRunServiceCommand(srv string) *cobra.Command {
Short: `Runs a ` + srv + ` service`,
Long: `Runs a ` + srv + ` service, spinning up a Docker container for it and exposing its internal configuration so that you are able to connect to it in an easy manner`,
Run: func(cmd *cobra.Command, args []string) {
serviceManager := services.NewServiceManager()
serviceManager := compose.NewServiceManager()

env := config.PutServiceEnvironment(map[string]string{}, srv, versionToRun)

Expand Down Expand Up @@ -96,7 +96,7 @@ Example:
go run main.go run profile fleet -s elastic-agent:8.0.0-SNAPSHOT
`,
Run: func(cmd *cobra.Command, args []string) {
serviceManager := services.NewServiceManager()
serviceManager := compose.NewServiceManager()

env := map[string]string{
"profileVersion": versionToRun,
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"context"

"github.com/elastic/e2e-testing/cli/config"
"github.com/elastic/e2e-testing/cli/services"
"github.com/elastic/e2e-testing/internal/compose"
log "github.com/sirupsen/logrus"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -55,7 +55,7 @@ func buildStopServiceCommand(srv string) *cobra.Command {
Short: `Stops a ` + srv + ` service`,
Long: `Stops a ` + srv + ` service, stoppping its Docker container`,
Run: func(cmd *cobra.Command, args []string) {
serviceManager := services.NewServiceManager()
serviceManager := compose.NewServiceManager()

err := serviceManager.StopCompose(context.Background(), false, []string{srv})
if err != nil {
Expand All @@ -73,7 +73,7 @@ func buildStopProfileCommand(key string, profile config.Profile) *cobra.Command
Short: `Stops the ` + profile.Name + ` profile`,
Long: `Stops the ` + profile.Name + ` profile, stopping the Services that compound it`,
Run: func(cmd *cobra.Command, args []string) {
serviceManager := services.NewServiceManager()
serviceManager := compose.NewServiceManager()

err := serviceManager.StopCompose(context.Background(), true, []string{key})
if err != nil {
Expand Down
12 changes: 6 additions & 6 deletions cli/cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"strings"

"github.com/elastic/e2e-testing/cli/config"
git "github.com/elastic/e2e-testing/cli/internal"
io "github.com/elastic/e2e-testing/cli/internal"
"github.com/elastic/e2e-testing/cli/services"
git "github.com/elastic/e2e-testing/internal/git"
io "github.com/elastic/e2e-testing/internal/io"
"github.com/elastic/e2e-testing/internal/sanitizer"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

Expand Down Expand Up @@ -197,7 +197,7 @@ func copyIntegrationsComposeFiles(beats git.Project, pattern string, target stri
}

type service interface{}
type compose struct {
type composeFile struct {
Version string `yaml:"version"`
Services map[string]service `yaml:"services"`
}
Expand All @@ -212,7 +212,7 @@ func sanitizeComposeFile(composeFilePath string, targetFilePath string) error {
return err
}

c := compose{}
c := composeFile{}
err = yaml.Unmarshal(bytes, &c)
if err != nil {
log.WithFields(log.Fields{
Expand Down Expand Up @@ -276,7 +276,7 @@ func sanitizeConfigurationFile(serviceName string, configFilePath string) error
// prepend modules header
content = "metricbeat.modules:\n" + content

serviceSanitizer := services.GetConfigSanitizer(serviceName)
serviceSanitizer := sanitizer.GetConfigSanitizer(serviceName)
content = serviceSanitizer.Sanitize(content)

log.WithFields(log.Fields{
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"

"github.com/Flaque/filet"
io "github.com/elastic/e2e-testing/cli/internal"
"github.com/elastic/e2e-testing/internal/io"
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2"
)
Expand All @@ -28,7 +28,7 @@ func TestSanitizeComposeFile_Multiple(t *testing.T) {
bytes, err := io.ReadFile(target)
assert.Nil(t, err)

c := compose{}
c := composeFile{}
err = yaml.Unmarshal(bytes, &c)
assert.Nil(t, err)

Expand Down Expand Up @@ -73,7 +73,7 @@ func TestSanitizeComposeFile_Single(t *testing.T) {
bytes, err := io.ReadFile(target)
assert.Nil(t, err)

c := compose{}
c := composeFile{}
err = yaml.Unmarshal(bytes, &c)
assert.Nil(t, err)

Expand Down
4 changes: 2 additions & 2 deletions cli/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"path/filepath"
"strings"

io "github.com/elastic/e2e-testing/cli/internal"
shell "github.com/elastic/e2e-testing/cli/shell"
io "github.com/elastic/e2e-testing/internal/io"
shell "github.com/elastic/e2e-testing/internal/shell"

packr "github.com/gobuffalo/packr/v2"
homedir "github.com/mitchellh/go-homedir"
Expand Down
2 changes: 1 addition & 1 deletion cli/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"testing"

io "github.com/elastic/e2e-testing/cli/internal"
"github.com/elastic/e2e-testing/internal/io"

"github.com/Flaque/filet"
"github.com/sirupsen/logrus"
Expand Down
Loading