-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d63d77
commit 90c9e03
Showing
3 changed files
with
45 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//go:build linux | ||
// +build linux | ||
|
||
package tuf | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func Test_getInterpreter(t *testing.T) { | ||
Check failure on line 13 in ee/tuf/finalize_linux_test.go GitHub Actions / lint (ubuntu-latest)
|
||
// Use the current executable in our test | ||
currentRunningExecutable, err := os.Executable() | ||
require.NoError(t, err, "getting current executable") | ||
|
||
// Confirm we pick the expected interpreter | ||
interpreter, err := getInterpreter(currentRunningExecutable) | ||
require.NoError(t, err, "expected no error getting interpreter") | ||
require.Equal(t, "ld-linux-x86-64.so.2", interpreter) | ||
} |
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,15 @@ | ||
//go:build !linux | ||
// +build !linux | ||
|
||
package tuf | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func Test_patchExecutable(t *testing.T) { | ||
Check failure on line 12 in ee/tuf/finalize_other_test.go GitHub Actions / lint (macos-latest)
Check failure on line 12 in ee/tuf/finalize_other_test.go GitHub Actions / lint (macos-latest)
Check failure on line 12 in ee/tuf/finalize_other_test.go GitHub Actions / lint (windows-latest)
|
||
// patchExecutable is a no-op on windows and darwin | ||
require.NoError(t, patchExecutable("")) | ||
} |