-
-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Allow for non-interactive age setup (#2970)
* [FEATURE] Allow for non-interactive age setup Also updates Go to Go 1.23.2 and get rid of min and max functions Signed-off-by: Yolan Romailler <[email protected]> * [n/a] also renaming clear for Windows Signed-off-by: Yolan Romailler <[email protected]> * [n/a] bumping our GHA to Go 1.23 Signed-off-by: Yolan Romailler <[email protected]> * [n/a] make our harden runner softer Signed-off-by: Yolan Romailler <[email protected]> * [n/a] make our harden runner accept go.dev Signed-off-by: Yolan Romailler <[email protected]> * [n/a] applying code review changes Signed-off-by: Yolan Romailler <[email protected]> --------- Signed-off-by: Yolan Romailler <[email protected]>
- Loading branch information
1 parent
75baa9b
commit 4c2caf3
Showing
31 changed files
with
117 additions
and
117 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 |
---|---|---|
|
@@ -30,6 +30,8 @@ jobs: | |
raw.githubusercontent.com:443 | ||
storage.googleapis.com:443 | ||
sum.golang.org:443 | ||
golang.org:443 | ||
go.dev:443 | ||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
with: | ||
|
@@ -38,7 +40,7 @@ jobs: | |
- name: Set up Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: '1.22' | ||
go-version: '1.23' | ||
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | ||
with: | ||
path: ~/go/pkg/mod | ||
|
@@ -92,7 +94,7 @@ jobs: | |
- name: Set up Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: '1.22' | ||
go-version: '1.23' | ||
|
||
- run: git config --global user.name nobody | ||
- run: git config --global user.email [email protected] | ||
|
@@ -115,7 +117,7 @@ jobs: | |
- name: Set up Go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: '1.22' | ||
go-version: '1.23' | ||
|
||
- run: git config --global user.name nobody | ||
- run: git config --global user.email [email protected] | ||
|
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
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 |
---|---|---|
|
@@ -29,10 +29,8 @@ func TestSetupAgeGitFS(t *testing.T) { | |
}) | ||
ctx = ctxutil.WithPasswordPurgeCallback(ctx, func(s string) {}) //nolint:staticcheck | ||
|
||
t.Skip("TODO: fix setup test") | ||
|
||
act, err := newMock(ctx, u.StoreDir("")) | ||
require.NoError(t, err) | ||
require.ErrorContains(t, err, "not initialized") | ||
require.NotNil(t, act) | ||
|
||
buf := &bytes.Buffer{} | ||
|
@@ -56,11 +54,11 @@ func TestSetupAgeGitFS(t *testing.T) { | |
require.NotNil(t, crypto) | ||
assert.Equal(t, "age", crypto.Name()) | ||
assert.True(t, act.initHasUseablePrivateKeys(ctx, crypto)) | ||
require.Error(t, act.initGenerateIdentity(ctx, crypto, "foo bar", "[email protected]")) | ||
require.NoError(t, act.initGenerateIdentity(ctx, crypto, "foo bar", "[email protected]")) | ||
buf.Reset() | ||
|
||
act.printRecipients(ctx, "") | ||
assert.Contains(t, buf.String(), "0xDEADBEEF") | ||
assert.Contains(t, buf.String(), "age1") | ||
buf.Reset() | ||
} | ||
|
||
|
@@ -89,8 +87,6 @@ func TestSetupPlainFS(t *testing.T) { | |
require.NoError(t, act.IsInitialized(c)) | ||
buf.Reset() | ||
|
||
t.Skip("TODO: fix these tests") | ||
|
||
require.Error(t, act.Init(c)) | ||
assert.Contains(t, buf.String(), "already initialized") | ||
buf.Reset() | ||
|
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
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
Oops, something went wrong.