1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
From: =?utf-8?b?SsOpcsO0bWUgQ2hhcmFvdWk=?= <jerome@riseup.net>
Date: Wed, 11 Jan 2023 21:47:41 -0500
Subject: Fix unknown symbol error in integration tests
This is a workaround for a clojure testsuite compilation error that
appears with the upstream code:
Syntax error compiling at (puppetlabs/services/jruby/jruby_metrics_service_test.clj:126:1).
Unable to resolve symbol: mock-puppetserver-config-service in this context
It's unknown what is causing the issue, it should be investigated at
some point, but the workaround should be sound and doesn't affect the
main app code which does not suffer this issue.
Forwarded: not-needed
---
.../puppetlabs/services/jruby/jruby_metrics_service_test.clj | 4 ++--
.../puppetlabs/services/jruby/jruby_puppet_pool_int_test.clj | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Index: puppetserver/test/integration/puppetlabs/services/jruby/jruby_metrics_service_test.clj
===================================================================
--- puppetserver.orig/test/integration/puppetlabs/services/jruby/jruby_metrics_service_test.clj
+++ puppetserver/test/integration/puppetlabs/services/jruby/jruby_metrics_service_test.clj
@@ -113,7 +113,7 @@
;; but we don't actually need any of the puppet config values, so here
;; we just create a mock services that passes through to the normal
;; TK config service to make the tests run faster.
-(tk/defservice mock-puppetserver-config-service
+(tk-services/defservice mock-puppetserver-config-service
ps-config-protocol/PuppetServerConfigService
[[:ConfigService get-config get-in-config]]
(get-config [this] (get-config))
@@ -121,7 +121,7 @@
(schema/defn ^:always-validate comidi-handler-service :- (schema/protocol tk-services/ServiceDefinition)
[coordinator :- (schema/protocol coordinator/TaskCoordinator)]
- (tk/service
+ (tk-services/service
[[:WebserverService add-ring-handler]
[:RequestHandlerService handle-request]]
(start [this context]
Index: puppetserver/test/integration/puppetlabs/services/jruby/jruby_puppet_pool_int_test.clj
===================================================================
--- puppetserver.orig/test/integration/puppetlabs/services/jruby/jruby_puppet_pool_int_test.clj
+++ puppetserver/test/integration/puppetlabs/services/jruby/jruby_puppet_pool_int_test.clj
@@ -441,7 +441,7 @@
(finally
(jruby-testutils/return-instance jruby-service jruby-instance :metrics-test))))))))
-(tk/defservice test-metric-web-service
+(tk-services/defservice test-metric-web-service
[[:WebserverService add-ring-handler]]
(init [this context]
(add-ring-handler
|