neha_gupta 495ff76a30
Update kopia password (#4397)
<!-- PR description-->

Update Kopia repo password from Corso CLI

#### Does this PR need a docs update or release note?

- [ ] 🕐 Yes, but in a later PR

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* https://github.com/alcionai/corso/issues/4061

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2023-10-16 10:16:15 +00:00

43 lines
1.1 KiB
Go

package testdata
import (
"testing"
"github.com/spf13/cobra"
"gotest.tools/v3/assert"
"github.com/alcionai/corso/src/cli/flags"
)
func PreparedStorageFlags() []string {
return []string{
"--" + flags.AWSAccessKeyFN, AWSAccessKeyID,
"--" + flags.AWSSecretAccessKeyFN, AWSSecretAccessKey,
"--" + flags.AWSSessionTokenFN, AWSSessionToken,
"--" + flags.PassphraseFN, CorsoPassphrase,
}
}
func AssertStorageFlags(t *testing.T, cmd *cobra.Command) {
assert.Equal(t, AWSAccessKeyID, flags.AWSAccessKeyFV)
assert.Equal(t, AWSSecretAccessKey, flags.AWSSecretAccessKeyFV)
assert.Equal(t, AWSSessionToken, flags.AWSSessionTokenFV)
assert.Equal(t, CorsoPassphrase, flags.PassphraseFV)
}
func PreparedProviderFlags() []string {
return []string{
"--" + flags.AzureClientIDFN, AzureClientID,
"--" + flags.AzureClientTenantFN, AzureTenantID,
"--" + flags.AzureClientSecretFN, AzureClientSecret,
}
}
func AssertProviderFlags(t *testing.T, cmd *cobra.Command) {
assert.Equal(t, AzureClientID, flags.AzureClientIDFV)
assert.Equal(t, AzureTenantID, flags.AzureClientTenantFV)
assert.Equal(t, AzureClientSecret, flags.AzureClientSecretFV)
}