-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Elastic Defend arm64 is not supported on Windows yet (#4155)
* Elastic Defend arm64 is not supported on Windows yet * fix lint * correct platform condition * machine architecture constants from MSDN * fix const declaration * refactoring; test fix * return fix * refactoring * refactoring * fix lint errors on legacy code * remove unnecessary access query mask * use updated go-sysinfo * fix unit test * revert accidental change * update go-sysinfo to official release * go mod tidy * update go-sysinfo * go mod tidy * hex edit version * Revert "hex edit version" This reverts commit 39a4ee9. * hex edit * go-sysinfo HostInfo.Architecture and HostInfo.NativeArchitecture use x86_64 instead of amd64 * unify amd64 arch in Agent * aarch64 to arm64 * lint fix: don't use Yoda ifs * try to increase test coverage ratio * fix goimports --------- Co-authored-by: Michal Pristas <[email protected]>
- Loading branch information
1 parent
c099110
commit e0a2204
Showing
11 changed files
with
92 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// 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. | ||
|
||
package info | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
|
||
"github.com/elastic/elastic-agent/internal/pkg/config" | ||
) | ||
|
||
func TestInjectAgentConfig(t *testing.T) { | ||
c := config.New() | ||
err := InjectAgentConfig(c) | ||
assert.NoError(t, err) | ||
} | ||
|
||
func TestAgentGlobalConfig(t *testing.T) { | ||
c, err := agentGlobalConfig() | ||
assert.NoError(t, err) | ||
assert.NotEmpty(t, c) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// 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. | ||
|
||
package component | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestLoadPlatformDetail(t *testing.T) { | ||
platformDetail, err := LoadPlatformDetail() | ||
assert.NoError(t, err) | ||
assert.NotEmpty(t, platformDetail) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters