mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 22:34:56 -04:00
AB#2512 Config secrets via env var & config refactoring (#544)
* refactor measurements to use consistent types and less byte pushing * refactor: only rely on a single multierr dependency * extend config creation with envar support * document changes Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
parent
80a801629e
commit
bb76a4e4c8
42 changed files with 932 additions and 791 deletions
|
@ -11,6 +11,8 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/internal/attestation/measurements"
|
||||
"github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
|
||||
"github.com/edgelesssys/constellation/v2/internal/config"
|
||||
"github.com/edgelesssys/constellation/v2/internal/constants"
|
||||
"github.com/edgelesssys/constellation/v2/internal/file"
|
||||
|
@ -41,7 +43,8 @@ func TestUpgradeExecute(t *testing.T) {
|
|||
cmd.Flags().String("config", constants.ConfigFilename, "") // register persistent flag manually
|
||||
|
||||
handler := file.NewHandler(afero.NewMemMapFs())
|
||||
require.NoError(handler.WriteYAML(constants.ConfigFilename, config.Default()))
|
||||
cfg := defaultConfigWithExpectedMeasurements(t, config.Default(), cloudprovider.Azure)
|
||||
require.NoError(handler.WriteYAML(constants.ConfigFilename, cfg))
|
||||
|
||||
err := upgradeExecute(cmd, tc.upgrader, handler)
|
||||
if tc.wantErr {
|
||||
|
@ -57,6 +60,6 @@ type stubUpgrader struct {
|
|||
err error
|
||||
}
|
||||
|
||||
func (u stubUpgrader) Upgrade(context.Context, string, map[uint32][]byte) error {
|
||||
func (u stubUpgrader) Upgrade(context.Context, string, measurements.M) error {
|
||||
return u.err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue