Check the key paths too
This commit is contained in:
parent
19b5400811
commit
c5b07762d1
1 changed files with 7 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/cli/cli/v2/internal/codespaces/api"
|
||||
|
|
@ -87,6 +88,12 @@ func TestAutomaticSSHKeyPairs(t *testing.T) {
|
|||
if keyPair == nil {
|
||||
t.Error("Unexpected nil KeyPair from setupAutomaticSSHKeys")
|
||||
}
|
||||
if !strings.HasSuffix(keyPair.PrivateKeyPath, automaticPrivateKeyName) {
|
||||
t.Errorf("Expected private key path %v, got %v", automaticPrivateKeyName, keyPair.PrivateKeyPath)
|
||||
}
|
||||
if !strings.HasSuffix(keyPair.PublicKeyPath, automaticPrivateKeyName+".pub") {
|
||||
t.Errorf("Expected public key path %v, got %v", automaticPrivateKeyName+".pub", keyPair.PublicKeyPath)
|
||||
}
|
||||
|
||||
// Check that all the expected files are present
|
||||
for _, file := range tt.wantFinalFiles {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue