Skip to content
Browse files

Create a Gradle task to run the test server (#192)

* Create a Gradle task to run the test server

As an artifact of the old build system, the test server relies on having
the built registrar_(bin|dbg)*(\.css)?.js in place (see ConsoleUiAction
among others). As a result, we create a Gradle task that puts those
files into the correct, readable, location before running the test

* Depend on assemble rather than build

* refactor gitignores
  • Loading branch information...
gbrodman committed Jul 29, 2019
1 parent 9479e1e commit 56b10ea136d3c89e385f3e7d6c064ae2c87a8d65
Showing with 24 additions and 4 deletions.
  1. +6 −0 .gitignore
  2. +3 −3 config/
  3. +14 −0 core/build.gradle
  4. +1 −1 core/src/test/java/google/registry/server/
@@ -100,3 +100,9 @@ nomulus.iws

# Compiled JS/CSS code
@@ -78,7 +78,7 @@ def fails(self, file):
r".*Copyright 20\d{2} The Nomulus Authors\. All Rights Reserved\.",
("java", "js", "soy", "sql", "py", "sh", "gradle"), {
".git", "/build/", "/generated/", "node_modules/",
"", "registrar_bin.", "registrar_dbg."
"File did not include the license header.",

@@ -148,15 +148,15 @@ def fails(self, file):
{"/node_modules/", "registrar_bin."},
"Do not assign directly to the dom. Use goog.dom.setTextContent to set"
" to plain text, goog.dom.removeChildren to clear, or "
"soy.renderElement to render anything else",
{"/node_modules/", "google/registry/ui/js/util.js"},
{"/node_modules/", "google/registry/ui/js/util.js", "registrar_bin."},
"JavaScript files should not include console logging."
@@ -651,5 +651,19 @@ task buildToolImage(dependsOn: nomulus, type: Exec) {
commandLine 'docker', 'build', '-t', 'nomulus-tool', '.'

task copyJsFilesForTestServer(dependsOn: assemble, type: Copy) {
// Unfortunately the test server relies on having some compiled JS/CSS
// in place, so copy it over here
from "${resourcesDir}/google/registry/ui/"
include '**/*.js'
include '**/*.css'
into "${project.projectDir}/src/main/resources/google/registry/ui/"

task runTestServer(dependsOn: copyJsFilesForTestServer, type: JavaExec) {
main = 'google.registry.server.RegistryTestServerMain'
classpath = sourceSets.test.runtimeClasspath
} buildToolImage ':stage'
@@ -41,7 +41,7 @@
names = "--mode",
description = "UI console debug mode. RAW allows live editing; DEBUG allows rename testing.")
private ConsoleDebug mode = ConsoleDebug.RAW;
private ConsoleDebug mode = ConsoleDebug.PRODUCTION;

names = "--address",

0 comments on commit 56b10ea

Please sign in to comment.
You can’t perform that action at this time.