You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/02/14 18:25:00 UTC

[GitHub] [solr] HoustonPutman commented on a change in pull request #619: SOLR-11749 Several test changes

HoustonPutman commented on a change in pull request #619:
URL: https://github.com/apache/solr/pull/619#discussion_r806122005



##########
File path: solr/packaging/build.gradle
##########
@@ -160,3 +165,55 @@ distTar {
 distZip.enabled = false
 
 assemble.dependsOn installDist
+
+
+// We use Node to install BATS
+node {
+  // The Node.js project directory location
+  // This is where the package.json file and node_modules directory are located
+  // By default it is at the root of the current project
+  nodeProjectDir = project.ext.nodeProjectDir
+}
+
+task downloadBats(type: NpmTask) {
+  group = 'Build Dependency Download'
+  args = ["install", "bats",
+                     "ztombol/bats-support",
+                     "ztombol/bats-assert",
+  ]
+
+  inputs.files("${project.ext.nodeProjectDir}/package.json")
+  outputs.dir("${project.ext.nodeProjectDir}/node_modules/bats")
+  outputs.dir("${project.ext.nodeProjectDir}/node_modules/bats-support")
+  outputs.dir("${project.ext.nodeProjectDir}/node_modules/bats-assert")
+}
+
+task bats(type: Exec) {
+  dependsOn installDist
+  dependsOn downloadBats
+
+  def testOutput = "$buildDir/bats-output"

Review comment:
       Can we call this `integration-test-output`, and rename the task to `integrationTests` or something like that. To me, most people won't know what Bats is.

##########
File path: solr/docker/tests/cases/initdb/test.sh
##########
@@ -41,7 +41,7 @@ if [[ "$data" != /var/solr/initdb-was-here ]]; then
   echo "Test $TEST_DIR $tag failed; script did not run"
   exit 1
 fi
-data=$(docker exec --user=solr "$container_name" ls /var/solr/should-not-be; true)
+data=$(docker exec --user=solr "$container_name" ls /var/solr/should-not-be ; true)

Review comment:
       ?

##########
File path: solr/solr-ref-guide/build.gradle
##########
@@ -175,15 +173,6 @@ dependencies {
 
 // We use Node to install and run Antora
 node {
-    download = true
-    version = "16.13.2" // LTS
-
-    // The directory where Node.js is unpacked (when download is true)
-    workDir = file("${project.ext.rootNodeDir}/nodejs")
-
-    // The directory where npm is installed (when a specific version is defined)
-    npmWorkDir = file("${project.ext.rootNodeDir}/npm")
-
     // The directory where yarn is installed (when a Yarn task is used)

Review comment:
       Shouldn't need to keep the yarn directory either.

##########
File path: gradle/node.gradle
##########
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: "com.github.node-gradle.node"
+
+ext {
+    rootNodeDir = "$rootDir/.gradle/node"
+}
+
+node {

Review comment:
       Instead of sourcing, can you do a project configure, like is done throughout other files in this directory?
   
   Example: https://github.com/apache/solr/blob/main/gradle/solr/packaging.gradle#L39

##########
File path: solr/packaging/test/bats_helper.bash
##########
@@ -0,0 +1,65 @@
+#!/usr/bin/env bats

Review comment:
       is this a bash or bats file?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org