System.Data.SQLite
Check-in [f68d495bea]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Move test suite SecurityProtocol handling into the vendor script and make it more robust.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f68d495bea05ee2f90109c996bf0cb736e0f6b2b
User & Date: mistachkin 2019-10-05 03:01:24
Context
2019-10-05
03:32
Add support for new DBCONFIG options from the SQLite core library. Pursuant to [03b6b0edd7]. check-in: 42082ffc4d user: mistachkin tags: trunk
03:01
Move test suite SecurityProtocol handling into the vendor script and make it more robust. check-in: f68d495bea user: mistachkin tags: trunk
02:15
Simplify test suite changes from check-in [cdd3330990]. check-in: 0388466597 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Externals/Eagle/lib/Eagle1.0/vendor.eagle.

79
80
81
82
83
84
85
















































86
87
88
89
90
91
92
...
437
438
439
440
441
442
443







444
445
446
447
448
449
450
      #
      if {![uplevel 1 [list info exists test_overrides]]} then {
        uplevel 1 [list set test_overrides $varNames]
      }

      return $result
    }
















































 
    proc refreshAutoPath {} {
      if {[llength [info commands debug]] > 0 && \
          [llength [info subcommands debug refreshautopath]] > 0 && \
          [catch {debug refreshautopath true}] == 0} then {
        return debug
      }
................................................................................
      #       directory then modify the TestPath property of the current
      #       interpreter to point directly to it.
      #
      if {[string length $vendor_test_directory] > 0} then {
        setupInterpreterTestPath stdout $vendor_test_directory \
            [checkForVendorQuiet setupInterpreterTestPath]
      }







    }

    #
    # HACK: When the Eagle core test suite infrastructure is beta 44 or
    #       lower, override the [getKnownMonoVersions] procedure to add
    #       more "known" versions of the Mono runtime.  Eventually, this
    #       override should be removed (i.e. once the Eagle core library







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>







79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
...
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
      #
      if {![uplevel 1 [list info exists test_overrides]]} then {
        uplevel 1 [list set test_overrides $varNames]
      }

      return $result
    }
 
    proc checkForSecurityProtocols { channel quiet } {
      #
      # HACK: There is at least one test and one build tool in this source
      #       tree require using HTTPS.  Therefore, make sure all protocol
      #       versions are enabled so we do not get spurious TLS failures.
      #
      if {![info exists ::no(checkSecurityProtocols)] && \
          [llength [info commands object]] > 0} then {
        set allSecurityProtocols ""

        if {[catch {
          set oldSecurityProtocols [object invoke \
              System.Net.ServicePointManager SecurityProtocol]

          set allSecurityProtocols [join [string map [list "  " " "] \
              [string trim [string map [list SystemDefault ""] [object \
              invoke Enum GetNames System.Net.SecurityProtocolType]]]] \
              ", "]

          object invoke System.Net.ServicePointManager SecurityProtocol \
              $allSecurityProtocols

          set newSecurityProtocols [object invoke \
              System.Net.ServicePointManager SecurityProtocol]
        } error] == 0} then {
          if {!$quiet} then {
            catch {
              tqputs $channel [appendArgs \
                  "---- forcibly enabled all HTTPS security protocols \"" \
                  $allSecurityProtocols "\", old \"" $oldSecurityProtocols \
                  "\", new \"" $newSecurityProtocols \"\n]
            }
          }
        } else {
          if {!$quiet} then {
            catch {
              tqputs $channel [appendArgs \
                  "==== WARNING: could not forcibly enable all HTTPS " \
                  "security protocols " [expr {[string length \
                  $allSecurityProtocols] > 0 ? [appendArgs \" \
                  $allSecurityProtocols \"] : "<unknown>"}] ", error: " \
                  \n\t $error \n]
            }
          }
        }
      }
    }
 
    proc refreshAutoPath {} {
      if {[llength [info commands debug]] > 0 && \
          [llength [info subcommands debug refreshautopath]] > 0 && \
          [catch {debug refreshautopath true}] == 0} then {
        return debug
      }
................................................................................
      #       directory then modify the TestPath property of the current
      #       interpreter to point directly to it.
      #
      if {[string length $vendor_test_directory] > 0} then {
        setupInterpreterTestPath stdout $vendor_test_directory \
            [checkForVendorQuiet setupInterpreterTestPath]
      }

      #
      # NOTE: Check if the HTTPS security protocols need to be adjusted for
      #       use with the test suite and/or build tools.
      #
      checkForSecurityProtocols stdout \
          [checkForVendorQuiet checkForSecurityProtocols]
    }

    #
    # HACK: When the Eagle core test suite infrastructure is beta 44 or
    #       lower, override the [getKnownMonoVersions] procedure to add
    #       more "known" versions of the Mono runtime.  Eventually, this
    #       override should be removed (i.e. once the Eagle core library

Changes to Tests/session.eagle.

1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365

###############################################################################

runTest {test session-1.9 {apply change set (remote stream)} -setup {
  setupDb [set fileName session-1.9.db]

  cleanupSomeText

  if {[info exists ::eagle_platform(frameworkVersion)] && \
      [package vcompare $::eagle_platform(frameworkVersion) \
          4.0.30319.42000] >= 0} then {
    object invoke System.Net.ServicePointManager SecurityProtocol \
        {Ssl3 Tls Tls12 Tls11}
  }
} -body {
  createTheSchema $db main

  set connection [getDbConnection]

  set webClient [object create -alias System.Net.WebClient]








<
<
<
<
<
<
<







1345
1346
1347
1348
1349
1350
1351







1352
1353
1354
1355
1356
1357
1358

###############################################################################

runTest {test session-1.9 {apply change set (remote stream)} -setup {
  setupDb [set fileName session-1.9.db]

  cleanupSomeText







} -body {
  createTheSchema $db main

  set connection [getDbConnection]

  set webClient [object create -alias System.Net.WebClient]