2016-03-04 05:14:55 -05:00
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
2016-03-10 20:46:22 -05:00
|
|
|
// Licensed under the MIT License. See the LICENSE file in builder/azure for license information.
|
2016-03-04 05:14:55 -05:00
|
|
|
|
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestRandomPassword_generates_15char_passwords(t *testing.T) {
|
|
|
|
for i := 0; i < 100; i++ {
|
|
|
|
pw := RandomPassword()
|
|
|
|
t.Logf("pw: %v", pw)
|
|
|
|
if len(pw) != 15 {
|
|
|
|
t.Fatalf("len(pw)!=15, but %v: %v (%v)", len(pw), pw, i)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|