Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for readFromSecret (0.2 sec)

  1. cmd/common-main_test.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"errors"
    	"os"
    	"reflect"
    	"testing"
    )
    
    func Test_readFromSecret(t *testing.T) {
    	testCases := []struct {
    		content       string
    		expectedErr   bool
    		expectedValue string
    	}{
    		{
    			"value\n",
    			false,
    			"value",
    		},
    		{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.7K bytes
    - Viewed (0)
  2. cmd/common-main.go

    		rootUser, err := readFromSecret(env.Get(config.EnvRootUserFile, ""))
    		if err != nil {
    			logger.Fatal(config.ErrInvalidCredentials(err),
    				"Unable to validate credentials inherited from the secret file(s)")
    		}
    		if rootUser != "" {
    			os.Setenv(config.EnvRootUser, rootUser)
    		}
    	}
    
    	if env.IsSet(config.EnvRootPasswordFile) {
    		rootPassword, err := readFromSecret(env.Get(config.EnvRootPasswordFile, ""))
    		if err != nil {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 35.5K bytes
    - Viewed (2)
Back to top