Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 21:50:11 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  2. cmd/common-main_test.go

    			tmpfile, err := os.CreateTemp("", "testfile")
    			if err != nil {
    				t.Error(err)
    			}
    			tmpfile.WriteString(testCase.content)
    			tmpfile.Sync()
    			tmpfile.Close()
    
    			value, err := readFromSecret(tmpfile.Name())
    			if err != nil && !testCase.expectedErr {
    				t.Error(err)
    			}
    			if err == nil && testCase.expectedErr {
    				t.Error(errors.New("expected error, found success"))
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 19 18:05:16 UTC 2022
    - 3.7K bytes
    - Viewed (0)
Back to top