Skip to content

Commit

Permalink
Revert "ci: enable windows for testing heartbeat (#32937)"
Browse files Browse the repository at this point in the history
This reverts commit 8552e34.
  • Loading branch information
andrewvc authored Sep 12, 2022
1 parent d20fff4 commit 5991aa1
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 59 deletions.
58 changes: 28 additions & 30 deletions x-pack/heartbeat/Jenkinsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,34 @@ stages:
- "macosTest"
tags: true ## for all the tags
stage: extended
windows-2022:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-2022"
stage: mandatory
windows-2019:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-2019"
stage: extended_win
windows-2016:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-2016"
stage: mandatory
windows-2012:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-2012-r2"
stage: extended_win
windows-10:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-10"
stage: extended_win
windows-8:
mage: "mage build test"
platforms: ## override default labels in this specific stage.
- "windows-8"
stage: extended_win
# TODO: there are windows test failures already reported
# https://github.com/elastic/beats/issues/23957 and https://github.com/elastic/beats/issues/23958
# waiting for being fixed.
# windows-2019:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-2019"
# stage: extended_win
# windows-2016:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-2016"
# stage: mandatory
# windows-2012:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-2012-r2"
# stage: extended_win
# windows-10:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-10"
# stage: extended_win
# windows-8:
# mage: "mage build test"
# platforms: ## override default labels in this specific stage.
# - "windows-8"
# stage: extended_win
packaging-linux:
packaging-linux: "mage package"
e2e:
Expand Down
2 changes: 0 additions & 2 deletions x-pack/heartbeat/monitors/browser/source/inline.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
2 changes: 0 additions & 2 deletions x-pack/heartbeat/monitors/browser/source/inline_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
3 changes: 0 additions & 3 deletions x-pack/heartbeat/monitors/browser/source/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
3 changes: 0 additions & 3 deletions x-pack/heartbeat/monitors/browser/source/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
2 changes: 0 additions & 2 deletions x-pack/heartbeat/monitors/browser/source/offline.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
2 changes: 0 additions & 2 deletions x-pack/heartbeat/monitors/browser/source/project.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
2 changes: 0 additions & 2 deletions x-pack/heartbeat/monitors/browser/source/project_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
//go:build linux || darwin
// +build linux darwin

package source

Expand Down
1 change: 0 additions & 1 deletion x-pack/heartbeat/monitors/browser/source/source.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

Expand Down
3 changes: 0 additions & 3 deletions x-pack/heartbeat/monitors/browser/source/validatepackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
3 changes: 0 additions & 3 deletions x-pack/heartbeat/monitors/browser/source/zipurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
3 changes: 0 additions & 3 deletions x-pack/heartbeat/monitors/browser/source/zipurl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

//go:build linux || darwin
// +build linux darwin

package source

import (
Expand Down
1 change: 1 addition & 0 deletions x-pack/heartbeat/scenarios/basics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
_ "github.com/elastic/beats/v7/heartbeat/monitors/active/http"
_ "github.com/elastic/beats/v7/heartbeat/monitors/active/icmp"
_ "github.com/elastic/beats/v7/heartbeat/monitors/active/tcp"
_ "github.com/elastic/beats/v7/x-pack/heartbeat/monitors/browser"
)

func TestSimpleScenariosBasicFields(t *testing.T) {
Expand Down
26 changes: 26 additions & 0 deletions x-pack/heartbeat/scenarios/scenarios.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"net/http/httptest"
"net/url"
"os"
"sync"

"github.com/elastic/elastic-agent-libs/mapstr"
Expand Down Expand Up @@ -69,5 +70,30 @@ var Scenarios = &ScenarioDB{
}, func() {}, nil
},
},
{
Name: "simple-browser",
Type: "browser",
Tags: []string{"browser", "browser-inline"},
Runner: func() (config mapstr.M, close func(), err error) {
err = os.Setenv("ELASTIC_SYNTHETICS_CAPABLE", "true")
if err != nil {
return nil, nil, err
}
server := httptest.NewServer(hbtest.HelloWorldHandler(200))
config = mapstr.M{
"id": "browser-test-id",
"name": "browser-test-name",
"type": "browser",
"schedule": "@every 1m",
"hosts": []string{"127.0.0.1"},
"source": mapstr.M{
"inline": mapstr.M{
"script": fmt.Sprintf("step('load server', async () => {await page.goto('%s')})", server.URL),
},
},
}
return config, server.Close, nil
},
},
},
}

0 comments on commit 5991aa1

Please sign in to comment.