@@ -1464,7 +1464,7 @@ suite('Connection Controller Test Suite', function () {
1464
1464
) ;
1465
1465
assert . strictEqual (
1466
1466
updatedConnection . secretStorageLocation ,
1467
- SecretStorageLocation . Keytar
1467
+ SecretStorageLocation . KeytarSecondAttempt
1468
1468
) ;
1469
1469
} ) ;
1470
1470
@@ -1661,6 +1661,16 @@ suite('Connection Controller Test Suite', function () {
1661
1661
} ,
1662
1662
'random-connection-2' : {
1663
1663
id : 'random-connection-2' ,
1664
+ name : 'localhost:27017' ,
1665
+ storageLocation : 'GLOBAL' ,
1666
+ secretStorageLocation : SecretStorageLocation . KeytarSecondAttempt ,
1667
+ connectionOptions : {
1668
+ connectionString :
1669
+ 'mongodb://localhost:27017/?readPreference=primary&ssl=false' ,
1670
+ } ,
1671
+ } ,
1672
+ 'random-connection-3' : {
1673
+ id : 'random-connection-3' ,
1664
1674
name : 'localhost:27018' ,
1665
1675
storageLocation : 'GLOBAL' ,
1666
1676
connectionOptions : {
@@ -1676,7 +1686,7 @@ suite('Connection Controller Test Suite', function () {
1676
1686
( connectionInfo ) =>
1677
1687
Promise . resolve ( {
1678
1688
...connectionInfo ,
1679
- secretStorageLocation : SecretStorageLocation . Keytar ,
1689
+ secretStorageLocation : SecretStorageLocation . KeytarSecondAttempt ,
1680
1690
} as any )
1681
1691
) ;
1682
1692
const trackStub = testSandbox . stub (
@@ -1691,16 +1701,16 @@ suite('Connection Controller Test Suite', function () {
1691
1701
// Notified to user
1692
1702
assert . strictEqual ( showInformationMessageStub . calledOnce , true ) ;
1693
1703
assert . deepStrictEqual ( showInformationMessageStub . lastCall . args , [
1694
- keytarMigrationFailedMessage ( 1 ) ,
1704
+ keytarMigrationFailedMessage ( 2 ) ,
1695
1705
] ) ;
1696
1706
1697
1707
// Tracked
1698
1708
assert . strictEqual ( trackStub . calledOnce , true ) ;
1699
1709
assert . deepStrictEqual ( trackStub . lastCall . args , [
1700
1710
{
1701
- saved_connections : 2 ,
1702
- loaded_connections : 2 ,
1703
- connections_with_failed_keytar_migration : 1 ,
1711
+ saved_connections : 3 ,
1712
+ loaded_connections : 3 ,
1713
+ connections_with_failed_keytar_migration : 2 ,
1704
1714
} ,
1705
1715
] ) ;
1706
1716
} ) ;
@@ -1719,7 +1729,7 @@ suite('Connection Controller Test Suite', function () {
1719
1729
id : 'random-connection-1' ,
1720
1730
name : 'localhost:27017' ,
1721
1731
storageLocation : 'GLOBAL' ,
1722
- secretStorageLocation : SecretStorageLocation . Keytar ,
1732
+ secretStorageLocation : SecretStorageLocation . KeytarSecondAttempt ,
1723
1733
connectionOptions : {
1724
1734
connectionString :
1725
1735
'mongodb://localhost:27017/?readPreference=primary&ssl=false' ,
@@ -1729,7 +1739,7 @@ suite('Connection Controller Test Suite', function () {
1729
1739
id : 'random-connection-2' ,
1730
1740
name : 'localhost:27018' ,
1731
1741
storageLocation : 'GLOBAL' ,
1732
- secretStorageLocation : SecretStorageLocation . Keytar ,
1742
+ secretStorageLocation : SecretStorageLocation . KeytarSecondAttempt ,
1733
1743
connectionOptions : {
1734
1744
connectionString :
1735
1745
'mongodb://localhost:27018/?readPreference=primary&ssl=false' ,
@@ -1743,7 +1753,7 @@ suite('Connection Controller Test Suite', function () {
1743
1753
( connectionInfo ) =>
1744
1754
Promise . resolve ( {
1745
1755
...connectionInfo ,
1746
- secretStorageLocation : SecretStorageLocation . Keytar ,
1756
+ secretStorageLocation : SecretStorageLocation . KeytarSecondAttempt ,
1747
1757
} as any )
1748
1758
) ;
1749
1759
const trackStub = testSandbox . stub (
@@ -1802,6 +1812,16 @@ suite('Connection Controller Test Suite', function () {
1802
1812
'mongodb://localhost:27018/?readPreference=primary&ssl=false' ,
1803
1813
} ,
1804
1814
} ,
1815
+ 'random-connection-4' : {
1816
+ id : 'random-connection-4' ,
1817
+ name : 'localhost:27018' ,
1818
+ storageLocation : 'GLOBAL' ,
1819
+ secretStorageLocation : SecretStorageLocation . KeytarSecondAttempt ,
1820
+ connectionOptions : {
1821
+ connectionString :
1822
+ 'mongodb://localhost:27018/?readPreference=primary&ssl=false' ,
1823
+ } ,
1824
+ } ,
1805
1825
} as any ;
1806
1826
} ) ;
1807
1827
testSandbox . replace (
@@ -1824,10 +1844,10 @@ suite('Connection Controller Test Suite', function () {
1824
1844
assert . strictEqual ( trackStub . calledOnce , true ) ;
1825
1845
assert . deepStrictEqual ( trackStub . lastCall . args , [
1826
1846
{
1827
- connections_with_secrets_in_keytar : 1 ,
1847
+ connections_with_secrets_in_keytar : 2 ,
1828
1848
connections_with_secrets_in_secret_storage : 2 ,
1829
- saved_connections : 3 ,
1830
- loaded_connections : 3 ,
1849
+ saved_connections : 4 ,
1850
+ loaded_connections : 4 ,
1831
1851
} ,
1832
1852
] ) ;
1833
1853
} ) ;
0 commit comments