File tree Expand file tree Collapse file tree 3 files changed +26
-21
lines changed Expand file tree Collapse file tree 3 files changed +26
-21
lines changed Original file line number Diff line number Diff line change 173
173
(module+ test
174
174
(require rackunit rackunit-abbrevs ipoe/private/util/check-print)
175
175
176
+ (define CI? (equal? "true " (getenv "CI " )))
177
+
176
178
;; -- get-username
177
179
(check-apply* (lambda (k1 k2)
178
180
(check-print (list #rx"command-line$ " )
238
240
;; -- psql-create-tables TODO
239
241
240
242
;; -- psql-installed?, pass (machine-dependent)
241
- (check-true
242
- (check-print
243
- (list #rx"^Checking for `psql` " )
244
- psql-installed?))
243
+ (when (not CI?)
244
+ (check-true
245
+ (check-print
246
+ (list #rx"^Checking for `psql` " )
247
+ psql-installed?)))
245
248
246
249
;; -- psql-installed?, fail TODO
247
250
248
251
;; -- psql-running, pass (machine-dependent)
249
- (check-true
250
- (check-print
251
- (list #rx"^Checking for psql server " )
252
- psql-running?))
252
+ (when (not CI?)
253
+ (check-true
254
+ (check-print
255
+ (list #rx"^Checking for psql server " )
256
+ psql-running?)))
253
257
254
258
;; -- save-config TODO
255
259
Original file line number Diff line number Diff line change 864
864
;; (thread-wait prompt-thread))))
865
865
866
866
;; -- with-ipoe-db, invalid user
867
- (parameterize ([*online?* #f ])
868
- (check-exn #rx"^Failed to connect "
869
- (lambda ()
870
- (with-ipoe-db #:user "ANONSTEIN " #:dbname "MISSING-TABLE "
871
- (lambda () (void))))))
867
+ (when (not CI?)
868
+ (parameterize ([*online?* #f ])
869
+ (check-exn #rx"^Failed to connect "
870
+ (lambda ()
871
+ (with-ipoe-db #:user "ANONSTEIN " #:dbname "MISSING-TABLE "
872
+ (lambda () (void)))))))
872
873
873
874
;; -- with-ipoe-db, online-mode, check that preferences are saved
874
875
(with-config/cache [#f #f ]
Original file line number Diff line number Diff line change 384
384
(check-false (file-exists? g))
385
385
(check-false (file-exists? l))
386
386
;; -- create a dummy .ipoe file, to make sure init works
387
- (parameterize ([current-directory (find-system-path 'temp-dir )])
388
- (unless (file-exists? IPOE-CONFIG )
389
- (with-output-to-file IPOE-CONFIG
390
- (lambda () (displayln "#:test output " ))))
391
- ( define ln* (file->lines IPOE-CONFIG))
392
- ( define o*+ (options-init) )
393
- ;; TODO not sure what expected should be
394
- (check-equal? (options-count o*+) (sub1 (length ln*))) )]
387
+ (define o*+
388
+ (parameterize ([current-directory (find-system-path 'temp-dir )] )
389
+ (with-output-to-file IPOE-CONFIG #:exists 'replace
390
+ (lambda () (displayln "#:test output " )))
391
+ ( begin0
392
+ (options-init)
393
+ (delete-file IPOE-CONFIG))))
394
+ (check-equal? (options-count o*+) 1 )]
395
395
[else
396
396
;; -- Number of default options should be at least the length of
397
397
;; each config file. (It's not the sum because duplicates don't
You can’t perform that action at this time.
0 commit comments